예제 #1
0
        public void IncludesAndExcludesWithWildcards_MatchingElement_ElementIsAccepted()
        {
            IFilter filter = new DefaultFilter(new[] { "+Test*", "-SomeExclude*" });

            Assert.IsTrue(filter.IsElementIncludedInReport("Test"), "Element is expected to be included.");
            Assert.IsTrue(filter.IsElementIncludedInReport("Test123"), "Element is expected to be included.");
        }
예제 #2
0
        public void IncludesAndExcludesWithWildcards_NotMatchingElement_ElementIsNotAccepted()
        {
            IFilter filter = new DefaultFilter(new[] { "+Test*", "-Tes*" });

            Assert.IsFalse(filter.IsElementIncludedInReport("Test"), "Element is expected to be included.");
            Assert.IsFalse(filter.IsElementIncludedInReport("PrefixTest123"), "Element is expected to be included.");
        }
예제 #3
0
        public void OnlyIncludesWithWildcards_NotMatchingElement_ElementIsNotAccepted()
        {
            IFilter filter = new DefaultFilter(new[] { "+Test*" });

            Assert.False(filter.IsElementIncludedInReport("PrefixTest"), "Element is expected to be included.");
            Assert.False(filter.IsElementIncludedInReport("PrefixTest123"), "Element is expected to be included.");
            Assert.True(filter.HasCustomFilters);
        }
예제 #4
0
        public void IncludesAndExcludes_NotMatchingElement_ElementIsNotAccepted()
        {
            IFilter filter = new DefaultFilter(new[] { "+Test", "-Test" });

            Assert.False(filter.IsElementIncludedInReport("Test"), "Element is expected to be excluded.");
            Assert.False(filter.IsElementIncludedInReport("test"), "Element is expected to be excluded.");
            Assert.True(filter.HasCustomFilters);
        }
예제 #5
0
        public void OnlyIncludes_MatchingElement_ElementIsAccepted()
        {
            IFilter filter = new DefaultFilter(new[] { "+Test" });

            Assert.True(filter.IsElementIncludedInReport("Test"), "Element is expected to be included.");
            Assert.True(filter.IsElementIncludedInReport("test"), "Element is expected to be included.");
            Assert.True(filter.HasCustomFilters);
        }
예제 #6
0
        public void NoFilter_AnyElement_ElementIsAccepted()
        {
            IFilter filter = new DefaultFilter(new string[] { });

            Assert.True(filter.IsElementIncludedInReport("Test"), "Element is expected to be included.");
            Assert.True(filter.IsElementIncludedInReport("test"), "Element is expected to be included.");
            Assert.False(filter.HasCustomFilters);
        }
예제 #7
0
        public void OnlyIncludes_NotMatchingElement_ElementIsNotAccepted()
        {
            IFilter filter = new DefaultFilter(new[] { "+Test" });

            Assert.IsFalse(filter.IsElementIncludedInReport("Test123"), "Element is expected to be excluded.");
        }