예제 #1
0
        public void TestWithNoMatchingValueByShorterExpression()
        {
            var extractor = new ValueTokenExtractor("match");

            var token = extractor.ExtractToken("mat", 0, new Context(ExpressiveOptions.None));

            Assert.IsNull(token);
        }
예제 #2
0
        public static void TestWithNoMatchingValueByCase(ExpressiveOptions option)
        {
            var extractor = new ValueTokenExtractor("Match");

            var token = extractor.ExtractToken("match", 0, new Context(option));

            Assert.IsNull(token);
        }
예제 #3
0
        public void TestWithMatchingValueInALargerExpression()
        {
            var extractor = new ValueTokenExtractor("match");

            var token = extractor.ExtractToken("match()", 0, new Context(ExpressiveOptions.None));

            Assert.IsNotNull(token);
            Assert.AreEqual("match", token.CurrentToken);
        }
예제 #4
0
        public void TestWithMatchingValueIgnoringCase()
        {
            var extractor = new ValueTokenExtractor("match");

            var token = extractor.ExtractToken("MaTcH", 0, new Context(ExpressiveOptions.IgnoreCase));

            Assert.IsNotNull(token);
            Assert.AreEqual("match", token.CurrentToken);
        }