コード例 #1
0
        private static void AssertWildcard(string wildcard, string[] expectMatch, string[] expectNoMatch)
        {
            var regex = Wildcard.ToRegex(wildcard);

            foreach (var match in expectMatch)
            {
                Assert.IsTrue(regex.IsMatch(match), match);
            }
            foreach (var noMatch in expectNoMatch)
            {
                Assert.IsFalse(regex.IsMatch(noMatch), noMatch);
            }
        }