public void TestWithNoMatchingValueByShorterExpression() { var extractor = new ValueTokenExtractor("match"); var token = extractor.ExtractToken("mat", 0, new Context(ExpressiveOptions.None)); Assert.IsNull(token); }
public static void TestWithNoMatchingValueByCase(ExpressiveOptions option) { var extractor = new ValueTokenExtractor("Match"); var token = extractor.ExtractToken("match", 0, new Context(option)); Assert.IsNull(token); }
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); }
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); }