public void TryParseText_ShouldSetCorrectToken() { Token token; TokenReader.TryParseText("some text", 0, 9, out token).Should().BeTrue(); token.Length.Should().Be(9); token.Position.Should().Be(0); }
public void TryParseText_ShouldReturnFalse_WhenBeginEqualsEnd() { Token token; TokenReader.TryParseText("some text", 10, 10, out token).Should().BeFalse(); }
public void TryParseText_ShouldReturnFalse_WhenEndGreaterThenInputLength() { Token token; TokenReader.TryParseText("some text", 2, 100, out token).Should().BeFalse(); }
public void TryParseText_ShouldReturnFalse_WhenBeginLessThenZero() { Token token; TokenReader.TryParseText("some text", -1, 10, out token).Should().BeFalse(); }