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."); }
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."); }
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); }
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); }
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); }
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); }
public void OnlyIncludes_NotMatchingElement_ElementIsNotAccepted() { IFilter filter = new DefaultFilter(new[] { "+Test" }); Assert.IsFalse(filter.IsElementIncludedInReport("Test123"), "Element is expected to be excluded."); }