KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > susebox > java > JavaTestSuite


1 /*
2  * JavaTestSuite.java: JUnit test for the java package and its subpackages
3  *
4  * Copyright (C) 2001 Heiko Blau
5  *
6  * This file belongs to the Susebox Java core test suite.
7  * The Susebox Java core test suite is free software; you can redistribute it
8  * and/or modify it under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2.1 of the License,
10  * or (at your option) any later version.
11  *
12  * This software is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.
15  * See the GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License along
18  * with the Susebox Java core test suite. If not, write to the
19  *
20  * Free Software Foundation, Inc.
21  * 59 Temple Place, Suite 330,
22  * Boston, MA 02111-1307
23  * USA
24  *
25  * or check the Internet: http://www.fsf.org
26  *
27  * The Susebox Java core test suite uses the test framework JUnit by Kent Beck
28  * and Erich Gamma. You should have received a copy of their JUnit licence
29  * agreement along with the Susebox Java test suite.
30  *
31  * We do NOT provide the JUnit archive junit.jar nessecary to compile and run
32  * our tests, since we assume, that You either have it already or would like
33  * to get the current release Yourself.
34  * Please visit either:
35  * http://sourceforge.net/projects/junit
36  * or
37  * http://junit.org
38  * to obtain JUnit.
39  *
40  * Contact:
41  * email: heiko@susebox.de
42  */

43
44 package de.susebox.java;
45
46 //-----------------------------------------------------------------------------
47
// Imports
48
//
49
import junit.framework.Test;
50 import junit.framework.TestCase;
51 import junit.framework.TestSuite;
52
53 import de.susebox.java.lang.LangTestSuite;
54 import de.susebox.java.util.UtilTestSuite;
55
56 import de.susebox.TestUtilities;
57
58
59 //-----------------------------------------------------------------------------
60
// Class JavaTestSuite
61
//
62

63 /**<p>
64  * This is the test suite for the java package tree. It composes all test classes
65  * in the java subpackages to a single test suite.
66  *</p>
67  *
68  * @author Heiko Blau
69  */

70 public class JavaTestSuite extends TestCase {
71   
72   //---------------------------------------------------------------------------
73
// main method
74
//
75

76   /**
77    * call this method to invoke the tests
78    */

79   public static void main(String JavaDoc[] args) {
80     String JavaDoc[] tests = { JavaTestSuite.class.getName() };
81
82     TestUtilities.run(tests, args);
83   }
84   
85
86   //---------------------------------------------------------------------------
87
// suite method
88
//
89

90   /**
91    * Implementation of the JUnit method <code>suite</code>. For each set of test
92    * properties one or more tests are instantiated.
93    *
94    * @return a test suite
95    */

96   public static Test suite() {
97     TestSuite suite = new TestSuite(JavaTestSuite.class.getName());
98     
99     suite.addTest(LangTestSuite.suite());
100     suite.addTest(UtilTestSuite.suite());
101     return suite;
102   }
103
104   //---------------------------------------------------------------------------
105
// constructor
106
//
107

108   /**
109    * Constructor
110    */

111   public JavaTestSuite(String JavaDoc name) {
112     super(name);
113   }
114 }
115
Popular Tags