KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > otm > AllTests


1 package org.apache.ojb.otm;
2
3 import junit.framework.Test;
4 import junit.framework.TestSuite;
5 import org.apache.ojb.broker.HsqldbShutdown;
6
7 /**
8  * the facade to all TestCases in this package.
9  *
10  * @author Thomas Mahler
11  */

12 public class AllTests extends junit.framework.TestSuite
13 {
14     /** static reference to .class.
15      * Java does not provide any way to obtain the Class object from
16      * static method without naming it.
17      */

18     private static Class JavaDoc CLASS = AllTests.class;
19
20     /**
21      * runs the suite in a junit.textui.TestRunner.
22      */

23     public static void main(String JavaDoc[] args)
24     {
25         String JavaDoc[] arr = {CLASS.getName()};
26         junit.textui.TestRunner.main(arr);
27     }
28
29     /** build a TestSuite from all the TestCases in this package*/
30     public static Test suite()
31     {
32         TestSuite suite = new TestSuite();
33         suite.addTest(new TestSuite(OtmExamples.class));
34         suite.addTest(new TestSuite(LockTestUncommittedReads.class));
35         suite.addTest(new TestSuite(LockTestCommittedReads.class));
36         suite.addTest(new TestSuite(LockTestRepeatableReads.class));
37         suite.addTest(new TestSuite(LockTestSerializable.class));
38         suite.addTest(new TestSuite(SwizzleTests.class));
39         suite.addTest(new TestSuite(CopyTest.class));
40         suite.addTest(new TestSuite(DependentTests.class));
41
42         // BRJ: ensure shutdown of hsqldb
43
suite.addTestSuite(HsqldbShutdown.class);
44         return suite;
45     }
46
47 }
48
Popular Tags