infinitest-runner/src/test/java/org/infinitest/testrunner/TestNGRunnerTest.java
/**
	 * no test filters set: bad tests fail. But: the dependent test
	 * "shouldNoBeTestedDueToDependencyOnFilteredGroup" is not executed
	 */
no test filters set: bad tests fail. But: the dependent test
"shouldNoBeTestedDueToDependencyOnFilteredGroup" is not executed
no test filters set : bad tests fail . But : the dependent test " shouldNoBeTestedDueToDependencyOnFilteredGroup " is not executed
@Test
	public void shouldFailIfBadTestsAreNotFiltered() {
		final Set<String> failingMethods = new HashSet<String>(Arrays.asList("shouldNotBeTestedGroup", "shouldNotBeTestedGroup3", "shouldNotBeTestedGroup2"));
		TestResults results = runner.runTest(CLASS_UNDER_TEST);
		int counter = 0;
		for (TestEvent testEvent : results) {
			counter++;
			assertTrue(failingMethods.contains(testEvent.getTestMethod()));
			assertEquals(AssertionError.class.getName(), testEvent.getFullErrorClassName());
			assertEquals(CLASS_UNDER_TEST, testEvent.getTestName());
		}
		assertEquals(failingMethods.size(), counter);
	}
@ Test public void shouldFailIfBadTestsAreNotFiltered ( ) { final Set < String > failingMethods = new HashSet < String > ( Arrays . asList ( "shouldNotBeTestedGroup" , "shouldNotBeTestedGroup3" , "shouldNotBeTestedGroup2" ) ) ; TestResults results = runner . runTest ( CLASS_UNDER_TEST ) ; int counter = 0 ; for ( TestEvent testEvent : results ) { counter ++ ; assertTrue ( failingMethods . contains ( testEvent . getTestMethod ( ) ) ) ; assertEquals ( AssertionError . class . getName ( ) , testEvent . getFullErrorClassName ( ) ) ; assertEquals ( CLASS_UNDER_TEST , testEvent . getTestName ( ) ) ; } assertEquals ( failingMethods . size ( ) , counter ) ; }
no test filters set: bad tests fail.
no test filters set : bad tests fail .