public void AddIncludeThenExclude_Matches()
        {
            var matcher = new InclusionMatcher();

            matcher.AddIncludeRule(@"xx");
            matcher.AddExcludeRule(@"yy");

            var result = matcher.Match("aaxx");

            Assert.IsTrue(result);

            result = matcher.Match("xxyy");
            Assert.IsFalse(result);
        }
        public void CaseInsensitive_IgnoresCase()
        {
            var matcher = new InclusionMatcher(ignoreCase: true);

            matcher.AddIncludeRule(@"xx");

            var result = matcher.Match("XX");

            Assert.IsTrue(result);
        }
        public void CaseSensitive_MatchesCase()
        {
            var matcher = new InclusionMatcher(ignoreCase: false);

            matcher.AddIncludeRule(@"xx");

            var result = matcher.Match("XX");

            Assert.IsFalse(result);
        }
        public void AddExcludeRuleFirst_IncludesByDefault()
        {
            var matcher = new InclusionMatcher();

            matcher.AddExcludeRule(@"xx");

            var result = matcher.Match("blah");

            Assert.IsTrue(result);
        }