public void mWildcardsTest() { MatcherAccessor.ToWildcards target = new MatcherAccessor.ToWildcards(); string raw = "new tes;ted project-12, and 75_protection of various systems."; string rawExpected = raw; bool actual = target.mWildcards("pro*system", ref raw); Assert.AreEqual(rawExpected, raw); Assert.AreEqual(true, actual); }
public void mWildcardsTest1() { MatcherAccessor.ToWildcards target = new MatcherAccessor.ToWildcards(); string raw = "new tes;ted project-12, and 75_protection of various systems"; Assert.AreEqual(true, target.mWildcards("new*7*systems", ref raw)); Assert.AreEqual(true, target.mWildcards("", ref raw)); Assert.AreEqual(true, target.mWildcards("*", ref raw)); Assert.AreEqual(false, target.mWildcards("new*express", ref raw)); Assert.AreEqual(false, target.mWildcards("tes*ting*project", ref raw)); Assert.AreEqual(true, target.mWildcards("?", ref raw)); Assert.AreEqual(true, target.mWildcards("project?12", ref raw)); Assert.AreEqual(false, target.mWildcards("pro?tect", ref raw)); Assert.AreEqual(true, target.mWildcards("+", ref raw)); Assert.AreEqual(true, target.mWildcards("new+systems", ref raw)); Assert.AreEqual(false, target.mWildcards("systems+", ref raw)); }