Пример #1
0
        public void ToStringTest()
        {
            string      someExpression = "Some Expression *";
            RegexFilter filter         = new RegexFilter(new Regex(someExpression));

            Assert.AreEqual(filter.ToString(), "Regex('" + someExpression + "', None)");
        }
Пример #2
0
 public void NoMatches(string expressionToMatch)
 {
     string someExpression = "A*b+";
     RegexFilter filter = new RegexFilter(new Regex(someExpression));
     Assert.AreEqual(filter.ToString(), "Regex('" + someExpression + "', None)");
     Assert.IsFalse(filter.IsMatch(expressionToMatch));
 }
Пример #3
0
 public void Matches(string expressionToMatch, RegexOptions regexOptions)
 {
     string someExpression = "A*b+";
     RegexFilter filter = new RegexFilter(new Regex(someExpression, regexOptions));
     Assert.AreEqual(filter.ToString(), "Regex('" + someExpression + "', " + regexOptions + ")");
     Assert.IsTrue(filter.IsMatch(expressionToMatch));
 }
Пример #4
0
        public void NoMatches(string expressionToMatch)
        {
            string      someExpression = "A*b+";
            RegexFilter filter         = new RegexFilter(new Regex(someExpression));

            Assert.AreEqual(filter.ToString(), "Regex('" + someExpression + "', None)");
            Assert.IsFalse(filter.IsMatch(expressionToMatch));
        }
Пример #5
0
        public void Matches(string expressionToMatch, RegexOptions regexOptions)
        {
            string      someExpression = "A*b+";
            RegexFilter filter         = new RegexFilter(new Regex(someExpression, regexOptions));

            Assert.AreEqual(filter.ToString(), "Regex('" + someExpression + "', " + regexOptions + ")");
            Assert.IsTrue(filter.IsMatch(expressionToMatch));
        }
Пример #6
0
 public void ToStringTest()
 {
     string someExpression = "Some Expression *";
     RegexFilter filter = new RegexFilter(new Regex(someExpression));
     Assert.AreEqual(filter.ToString(), "Regex('" + someExpression + "', None)");
 }