public void ToStringTest() { string someExpression = "Some Expression *"; RegexFilter filter = new RegexFilter(new Regex(someExpression)); Assert.AreEqual(filter.ToString(), "Regex('" + someExpression + "', None)"); }
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)); }
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)); }
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)); }
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)); }
public void ToStringTest() { string someExpression = "Some Expression *"; RegexFilter filter = new RegexFilter(new Regex(someExpression)); Assert.AreEqual(filter.ToString(), "Regex('" + someExpression + "', None)"); }