コード例 #1
0
        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');
        }
コード例 #2
0
 internal char GetNextCharacter(TextCursor cursor)
 {
     Assert.IsTrue(cursor.MoveNext());
     return(cursor.Current);
 }