KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.apache.ojb.soda;
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(SodaExamples.class));
34
35         // BRJ: ensure shutdown of hsqldb
36
suite.addTestSuite(HsqldbShutdown.class);
37         return suite;
38     }
39 }
40
Popular Tags