public void ItMatchesFirst() { parser.Parse("foo.lorem"); Assert.True(parser.Success); Assert.AreEqual(0, parser.MatchedParserIndex); Assert.AreEqual("foo", parser.Value); }
public void Parse_Test() { var target = new AnyParser <char>(); var input = new StringCharacterSequence("abc"); target.Parse(input).Value.Should().Be('a'); target.Parse(input).Value.Should().Be('b'); target.Parse(input).Value.Should().Be('c'); target.Parse(input).Success.Should().BeFalse(); }