Beispiel #1
0
        public void MultiCharacterWildcard_WithNoMatch_ReturnsFalse(string str, string pattern)
        {
            var regexMatcher = new RegexMatcher(pattern, RegexOptions.None);

#if !NETCOREAPP
            var wildcardMatchMatcher = new WildcardMatchMatcher();
#endif
            var fastWildcardMatcher = new FastWildcardMatcher();

            var regexMatcherResult = regexMatcher.Match(str);
#if !NETCOREAPP
            var wildcardMatchMatcherResult = wildcardMatchMatcher.Match(pattern, str);
#endif
            var fastWildcardMatcherResult = fastWildcardMatcher.Match(str, pattern);

            regexMatcherResult.Should().BeFalse();
#if !NETCOREAPP
            wildcardMatchMatcherResult.Should().BeFalse();
#endif
            fastWildcardMatcherResult.Should().BeFalse();
        }
Beispiel #2
0
 public bool WildcardMatch() => _wildcardMatchMatcher.Match(_pattern, _str);