public void TestCase() { var r = new WildcardMatching(); Assert.True(r.IsMatch("abbaabbbbababaababababbabbbaaaabbbbaaabbbabaabbbbbabbbbabbabbaaabaaaabbbbbbaaabbabbbbababbbaaabbabbabb", "***b**a*a*b***b*a*b*bbb**baa*bba**b**bb***b*a*aab*a**")); Assert.False(r.IsMatch("aa", "a")); }
public void WildCardResultsInFailure() { string inputString = "acdcb"; string inputPattern = "a*c?b"; var result = new WildcardMatching().IsMatch(inputString, inputPattern); Assert.IsFalse(result); }
public void WildCardResultsInSuccess() { string inputString = "adceb"; string inputPattern = "*a*b"; var result = new WildcardMatching().IsMatch(inputString, inputPattern); Assert.IsTrue(result); }