public void TokenizeReturnsAllProducedTokens() { var tokenizer = new NumberListTokenizer(); var result = tokenizer.Tokenize("1 23 456"); Assert.Equal(3, result.Count()); }
public void SuperpowerToken() { var numbers = SuperpowerTokenListParser(Tokenizer.Tokenize(Numbers)); Assert.Equal(NumbersLength, numbers.Value.Length); }
public void TokenizeThrowsOnFailure() { var tokenizer = new NumberListTokenizer(); Assert.Throws <ParseException>(() => tokenizer.Tokenize("1 a")); }