Ejemplo n.º 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.");
        }
Ejemplo n.º 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.");
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 7
0
        public void OnlyIncludes_NotMatchingElement_ElementIsNotAccepted()
        {
            IFilter filter = new DefaultFilter(new[] { "+Test" });

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