
Is there a preferred method for unit testing a custom parser? I tried the unit test below:
[TestMethod]
public void TestSimpleCVs()
{
SyntaxEditor se = new SyntaxEditor();
se.Document = new EditorDocument();
se.Document.Language = new CalculatedVariableCustomLanguage();
se.Text = "2.71";
}
This is what I do in my app. In my parser, in the Parse method I get an ITextSnapshotReader via as per samples:
ITextSnapshotReader reader = request.Snapshot.GetReader(0);
The problem is in my unit tests the reader.IsAtSnapShotEnd is always true.
Thanks
[TestMethod]
public void TestSimpleCVs()
{
SyntaxEditor se = new SyntaxEditor();
se.Document = new EditorDocument();
se.Document.Language = new CalculatedVariableCustomLanguage();
se.Text = "2.71";
}
This is what I do in my app. In my parser, in the Parse method I get an ITextSnapshotReader via as per samples:
ITextSnapshotReader reader = request.Snapshot.GetReader(0);
The problem is in my unit tests the reader.IsAtSnapShotEnd is always true.
Thanks