Exemple #1
0
        public void TestMatchByCase()
        {
            var extractor = new KeywordTokenExtractor(new[] { "Matching" });

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

            Assert.IsNotNull(token);
            Assert.AreEqual("matching", token.CurrentToken);
        }
Exemple #2
0
        public void TestNoMatchByCase()
        {
            var extractor = new KeywordTokenExtractor(new[] { "Matching" });

            Assert.IsNull(extractor.ExtractToken("matching()", 0, new Context(ExpressiveOptions.None)));
        }
Exemple #3
0
 public void TestConstructingWithNull()
 {
     _ = new KeywordTokenExtractor(null);
 }