KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > junit > tests > runner > AllTests


1 package junit.tests.runner;
2
3 import junit.framework.*;
4 import junit.runner.BaseTestRunner;
5
6 /**
7  * TestSuite that runs all the sample tests
8  *
9  */

10 public class AllTests {
11
12     public static void main(String JavaDoc[] args) {
13         junit.textui.TestRunner.run(suite());
14     }
15     
16     public static Test suite() { // Collect tests manually because we have to test class collection code
17
TestSuite suite= new TestSuite("Framework Tests");
18         suite.addTestSuite(StackFilterTest.class);
19         suite.addTestSuite(SorterTest.class);
20         suite.addTestSuite(SimpleTestCollectorTest.class);
21         suite.addTestSuite(BaseTestRunnerTest.class);
22         suite.addTestSuite(TextFeedbackTest.class);
23         if (!BaseTestRunner.inVAJava()) {
24             suite.addTestSuite(TextRunnerTest.class);
25             if (!isJDK11())
26                 suite.addTest(new TestSuite(TestCaseClassLoaderTest.class));
27         }
28         return suite;
29     }
30     
31     static boolean isJDK11() {
32         String JavaDoc version= System.getProperty("java.version");
33         return version.startsWith("1.1");
34     }
35 }
Popular Tags