![Avatar](https://secure.gravatar.com/avatar/07f3e6b46d1d8c588214223e1d98929d.jpg?s=64&d=identicon&r=g)
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