Example #1
0
        public void TestPatternInner()
        {
            var plus   = new PatternFilter("*.cs");
            var minus  = new NegatePatternFilter("*.cs");
            var filter = new AndFilter <string>(plus, minus);
            var data   = new[] { "hoge.cs", "barTest.cs", "foo.cpp", "bar.rb" };

            Assert.That(filter.Filter(data), Is.Empty);
        }
Example #2
0
        public void TestNegatePatternFilter(string[] source, string negatePattern, string[] expected)
        {
            var filter = new NegatePatternFilter(negatePattern);

            Assert.That(filter.Filter(source), Is.EquivalentTo(expected));
        }