public static Test suite() { /* * the type safe way * TestSuite suite= new TestSuite(); suite.addTest( new testCar("Car.getWheels") { protected void runTest() { testGetWheels(); } } ); return suite; */
/* * the dynamic way */ return new TestSuite(testCar.class); }
public void testGetWheels() { assertEquals(expectedWheels, myCar.getWheels()); } }