public void ShouldFailToParseDifferentString() { var stringParser = BasicParsers.GetStringParser("whatever"); var result = stringParser.Parse("hatever") as Error <string>; Assert.AreEqual("Expected \"whatever\", got \"hatever\".", result?.Message); }
public void ShouldReturnCorrectRestToParse() { var stringParser = BasicParsers.GetStringParser("whatever"); var result = stringParser.Parse("whatever man"); Assert.AreEqual(" man", result.Rest); }
public void ShouldParseSameString() { var stringParser = BasicParsers.GetStringParser("whatever"); var result = stringParser.Parse("whatever"); Assert.AreNotEqual(typeof(Error <string>), result); }