示例#1
0
        public void TokenizeReturnsAllProducedTokens()
        {
            var tokenizer = new NumberListTokenizer();
            var result    = tokenizer.Tokenize("1 23 456");

            Assert.Equal(3, result.Count());
        }
示例#2
0
        public void SuperpowerToken()
        {
            var numbers = SuperpowerTokenListParser(Tokenizer.Tokenize(Numbers));

            Assert.Equal(NumbersLength, numbers.Value.Length);
        }
示例#3
0
        public void TokenizeThrowsOnFailure()
        {
            var tokenizer = new NumberListTokenizer();

            Assert.Throws <ParseException>(() => tokenizer.Tokenize("1 a"));
        }