public void TryMatch_NonMatchingInputsAreGiven_ResultIsNonMatching(string input) { var matcher = new KeywordMatcher(); var result = matcher.TryMatch(input); Assert.False(result.IsMatching); }
public void TryMatch_MatchingInputsAreGiven_ResultPropertiesAreValid(string input, string expectedTokenValue, int expectedNextIndex) { var matcher = new KeywordMatcher(); var result = matcher.TryMatch(input); Assert.True(result.IsMatching); Assert.AreEqual(TokenType.Keyword, result.Token.TokenType); Assert.AreEqual(expectedTokenValue, result.Token.Value); Assert.AreEqual(expectedNextIndex, result.NextIndex); }