public void MatchTestEmpty() { var filter = new OrFilter(new TestFilter[] {}); Assert.False(filter.Match(_dummyFixture)); Assert.False(filter.Match(_anotherFixture)); Assert.False(filter.Match(_yetAnotherFixture)); }
public void MatchTest() { var filter = new OrFilter(new CategoryFilter("Dummy"), new CategoryFilter("Another")); Assert.That(filter.Match(_dummyFixture)); Assert.That(filter.Match(_anotherFixture)); Assert.False(filter.Match(_yetAnotherFixture)); }
public void MatchTestFullNameRegex() { var filter = new OrFilter(new FullNameFilter(DUMMY_CLASS_REGEX, isRegex: true), new FullNameFilter(ANOTHER_CLASS_REGEX, isRegex: true)); Assert.That(filter.Match(_dummyFixture)); Assert.That(filter.Match(_anotherFixture)); Assert.False(filter.Match(_yetAnotherFixture)); }
public void MatchTestMixed() { var filter = new OrFilter(new CategoryFilter("Dummy"), new FullNameFilter(ANOTHER_CLASS)); Assert.That(filter.Match(_dummyFixture)); Assert.That(filter.Match(_anotherFixture)); Assert.False(filter.Match(_yetAnotherFixture)); }
public void TestNestedOrNotFilters() { var filter = new OrFilter( new CategoryFilter("Dummy"), new NotFilter(new CategoryFilter("Dummy"))); Assert.That(filter.Match(_dummyFixture)); Assert.That(filter.IsExplicitMatch(_dummyFixture)); Assert.That(filter.Match(_anotherFixture)); Assert.False(filter.IsExplicitMatch(_anotherFixture)); Assert.That(filter.Match(_yetAnotherFixture)); Assert.False(filter.IsExplicitMatch(_yetAnotherFixture)); Assert.That(filter.Match(_explicitFixture)); Assert.False(filter.IsExplicitMatch(_explicitFixture)); }
public void OrFilter_Constructor() { var filter = new OrFilter(new CategoryFilter("Dummy"), new CategoryFilter("Another")); Assert.False(filter.IsEmpty); Assert.That(filter.Match(dummyFixture)); Assert.That(filter.Match(anotherFixture)); }