public void Reconhece_Caractere_Invalido() { var element = new CharGrammarElement('a'); var extractor = TokenExtractor.FromString("A"); var token = element.Eval(extractor); Assert.Null(token); }
public void Reconhece_Caractere_Valido(char validChar) { var element = new CharGrammarElement(validChar); var onCharString = new string(new[] { validChar }); var extractor = TokenExtractor.FromString(onCharString); var token = element.Eval(extractor); Assert.NotNull(token); Assert.Equal(validChar, token.Content); }