public void TestMove_NextPrevious() { TextCursor cursor = MakeCursor("test"); ValidateBeginningOfString(cursor); Assert.True(cursor.Move(2), "Move(2)"); ValidateCurrentCharacter(cursor, 2, 's'); Assert.True(cursor.MovePrevious(), "MovePrevious()"); ValidateCurrentCharacter(cursor, 1, 'e'); Assert.True(cursor.MoveNext(), "MoveNext()"); ValidateCurrentCharacter(cursor, 2, 's'); }
internal char GetNextCharacter(TextCursor cursor) { Assert.IsTrue(cursor.MoveNext()); return(cursor.Current); }