KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfree > junit > JCommonTestSuite


1 /* ========================================================================
2  * JCommon : a free general purpose class library for the Java(tm) platform
3  * ========================================================================
4  *
5  * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
6  *
7  * Project Info: http://www.jfree.org/jcommon/index.html
8  *
9  * This library is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17  * License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
22  * USA.
23  *
24  * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
25  * in the United States and other countries.]
26  *
27  * ---------------------
28  * JCommonTestSuite.java
29  * ---------------------
30  * (C) Copyright 2001-2005, by Object Refinery Limited.
31  *
32  * Original Author: David Gilbert (for Object Refinery Limited);
33  * Contributor(s): -;
34  *
35  * $Id: JCommonTestSuite.java,v 1.4 2005/11/16 15:58:40 taqua Exp $
36  *
37  * Changes
38  * -------
39  * 11-Nov-2001 : Version 1 (DG);
40  * 02-Sep-2002 : Removed DataPackageTests (DG);
41  * 18-Sep-2003 : Added new org.jfree.io package tests (DG);
42  * 09-Jan-2004 : Added new org.jfree.ui package tests (DG);
43  * 22-Mar-2004 : Added tests for the org.jfree.text package (DG);
44  * 18-Jan-2005 : Added main() method (DG);
45  *
46  */

47
48 package org.jfree.junit;
49
50 import junit.framework.Test;
51 import junit.framework.TestCase;
52 import junit.framework.TestSuite;
53
54 import org.jfree.date.junit.DatePackageTests;
55 import org.jfree.io.junit.IOPackageTests;
56 import org.jfree.text.junit.TextPackageTests;
57 import org.jfree.ui.junit.UIPackageTests;
58 import org.jfree.util.junit.UtilPackageTests;
59
60 /**
61  * A test suite for the JCommon class library that can be run using JUnit (http://www.junit.org).
62  */

63 public class JCommonTestSuite extends TestCase {
64
65     /**
66      * Returns a test suite to the JUnit test runner.
67      *
68      * @return a test suite.
69      */

70     public static Test suite() {
71         final TestSuite suite = new TestSuite("JCommon");
72         suite.addTest(DatePackageTests.suite());
73         suite.addTest(IOPackageTests.suite());
74         suite.addTest(TextPackageTests.suite());
75         suite.addTest(UIPackageTests.suite());
76         suite.addTest(UtilPackageTests.suite());
77         return suite;
78     }
79
80     /**
81      * Constructs the test suite.
82      *
83      * @param name the suite name.
84      */

85     public JCommonTestSuite(final String JavaDoc name) {
86         super(name);
87     }
88
89     /**
90      * Runs the test suite using the JUnit text-based runner.
91      *
92      * @param args ignored.
93      */

94     public static void main(String JavaDoc[] args) {
95         junit.textui.TestRunner.run(suite());
96     }
97
98 }
99
Popular Tags