suite()
@RunWith(AllTests.class) public class ProductTests { public static junit.framework.Test suite() { ... } }
3435363738394041
runner.run(All.class); assertTrue(run); } @org.junit.Test public void correctTestCount() throws Throwable { AllTests tests= new AllTests(All.class); assertEquals(1, tests.testCount()); }
5455565758596061
return suite; } } @org.junit.Test public void correctTestCountAdapted() throws Throwable { AllTests tests= new AllTests(AllJUnit4.class); assertEquals(1, tests.testCount()); }
67686970717273
} } @org.junit.Test(expected= RuntimeException.class) public void exceptionThrownWhenSuiteIsBad() throws Throwable { new AllTests(BadSuiteMethod.class); }