public void TestStringCondition1() { var cond = new StringMatchCondition("abc"); Assert.IsTrue(cond.Matches("abc")); Assert.IsFalse(cond.Matches("abc1")); }
public void TestStringCondition2() { var cond = new StringMatchCondition("abc", MatchType.BeginsWith); Assert.IsTrue(cond.Matches("abc")); Assert.IsTrue(cond.Matches("abc1")); Assert.IsFalse(cond.Matches("1abc")); }
public void TestStringCondition3() { var cond = new StringMatchCondition("abc", MatchType.Contains); Assert.IsTrue(cond.Matches("abc")); Assert.IsTrue(cond.Matches("abc1")); Assert.IsTrue(cond.Matches("1abc")); Assert.IsFalse(cond.Matches("abd")); }
public void TestStringCondition4() { var cond = new StringMatchCondition(".*ab[cd].*", MatchType.RegexMatch); Assert.IsTrue(cond.Matches("abc")); Assert.IsTrue(cond.Matches("abc1")); Assert.IsTrue(cond.Matches("1abc")); Assert.IsTrue(cond.Matches("abd")); Assert.IsFalse(cond.Matches("abef")); }