FileDocCategorySizeDatePackage
AllTests.javaAPI DocExample1032Thu Aug 15 20:20:58 BST 2002com.oreilly.javaxp.junit

AllTests

public class AllTests extends TestCase
Runs all test suites in the current package and sub-packages.

Fields Summary
Constructors Summary
public AllTests(String name)

        super(name);
    
Methods Summary
public static junit.framework.Testsuite()

return
a suite containing all tests in this package and subpackages.

        TestSuite suite = new TestSuite();

        // add tests from the current directory
        suite.addTest(new TestSuite(TestGame.class));
        suite.addTest(new TestSuite(TestPerson.class));
        suite.addTest(new TestSuite(TestPersonEditorPanel.class));

        // only test subdirectories if a system property is true
        if ("true".equals(System.getProperty("test.subdirs"))) {
            // add AllTests from any sub-packages
            suite.addTest(com.oreilly.javaxp.junit.sub.AllTests.suite());
            // suite.addTest(...) // continue for other sub-packages
        }

        return suite;