public void NotAndNotFilterTests() { var filter = new NotFilter( new AndFilter( new NotFilter( new CategoryFilter("Dummy")), new MethodNameFilter("Test1"))); Assert.That(filter.Pass(_topLevelSuite)); Assert.That(filter.Match(_topLevelSuite)); Assert.That(filter.Pass(_fixtureWithMultipleTests)); Assert.That(filter.Match(_fixtureWithMultipleTests)); var test1 = _fixtureWithMultipleTests.Tests[0]; Assert.False(filter.Pass(test1)); Assert.False(filter.Match(test1)); var test2 = _fixtureWithMultipleTests.Tests[1]; Assert.That(filter.Pass(test2)); Assert.False(filter.IsExplicitMatch(test2)); Assert.That(filter.Match(test2)); }
public void MatchTest() { var filter = new NotFilter(new CategoryFilter("Dummy")); Assert.True(filter.Match(_topLevelSuite)); Assert.False(filter.Match(_dummyFixture)); Assert.True(filter.Match(_dummyFixture.Tests[0])); Assert.True(filter.Match(_anotherFixture)); }
public void TestNestedNotCategoryFilters() { var filter = new NotFilter(new CategoryFilter("NotDummy")); Assert.That(filter.Match(_dummyFixture)); Assert.False(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 NotFilter_Constructor() { var filter = new NotFilter(new CategoryFilter("Dummy")); Assert.False(filter.IsEmpty); Assert.False(filter.Match(dummyFixture)); Assert.True(filter.Match(anotherFixture)); }
public void NotFilter_Constructor_TopLevel() { var filter = new NotFilter(new CategoryFilter("Dummy")); filter.TopLevel = true; Assert.False(filter.IsEmpty); Assert.False(filter.Match(dummyFixture)); Assert.False(filter.Match(dummyFixture.Tests[0])); Assert.True(filter.Match(anotherFixture)); }