public void MoveAheadFourChars() { // First move ahead does nothing if the forward text // iterator was reset. I consider this a bug. All this // call does is put the iterator at the current position to // start the iteration. In this case it is after the last // character in the string, offset 3. forwardTextIterator.MoveAhead(1); bool firstMove = forwardTextIterator.MoveAhead(1); bool secondMove = forwardTextIterator.MoveAhead(1); bool thirdMove = forwardTextIterator.MoveAhead(1); bool fourthMove = forwardTextIterator.MoveAhead(1); Assert.IsTrue(firstMove); Assert.IsTrue(secondMove); Assert.IsTrue(thirdMove); Assert.IsFalse(fourthMove); }
public void CannotMoveAhead() { Assert.IsFalse(forwardTextIterator.MoveAhead(1)); }