KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > firstpartners > nounit > test > AllTests


1 package net.firstpartners.nounit.test;
2
3 /**
4  * Title: NoUnit - Identify Classes that are not being unit Tested
5  *
6  * Copyright (C) 2001 Paul Browne , FirstPartners.net
7  *
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * @author Paul Browne
24  * @version 0.7
25  */

26
27 import junit.framework.*;
28
29 /**
30  * Junit TestSuite that runs all the sample tests in the NoUnit Project
31  */

32
33 public class AllTests extends TestCase{
34     
35     /**
36      * Initialises the Class
37      *
38      */

39     public AllTests() {
40         super("");
41     }
42     
43     /**
44      * Constructor Required by Junit
45      * @param name
46      */

47     public AllTests(String JavaDoc name) {
48         super(name);
49     }
50     
51     /**
52      * Enable the Tests to be run from the command line
53      * @param args
54      */

55     public static void main(String JavaDoc args[]) {
56         
57         junit.textui.TestRunner.run(suite());
58         
59     }
60     
61     /**
62      * Test suite contains all tests to be run
63      * @return suite containing all JUnit tests to be run for this project
64      */

65     public static Test suite() {
66         
67         TestSuite suite= new TestSuite("All JUnit Tests");
68         
69         // Utility
70
suite.addTest(net.firstpartners.nounit.utility.test.TestNoUnitException.suite());
71         suite.addTest(net.firstpartners.nounit.utility.test.TestCollectionUtil.suite());
72         suite.addTest(net.firstpartners.nounit.utility.test.TestDirectoryWalker.suite());
73         suite.addTest(net.firstpartners.nounit.utility.test.TestXmlUtil.suite());
74         
75         
76         //Main Command Line
77
suite.addTest(net.firstpartners.nounit.ui.command.test.TestCommandLineProcessor.suite());
78         
79         //Snippets
80
suite.addTest(net.firstpartners.nounit.snippet.test.TestSnippets.suite());
81         suite.addTest(net.firstpartners.nounit.snippet.test.TestSnippetMethod.suite());
82         suite.addTest(net.firstpartners.nounit.snippet.test.TestSnippetClass.suite());
83         suite.addTest(net.firstpartners.nounit.snippet.test.TestSnippetPackage.suite());
84         suite.addTest(net.firstpartners.nounit.snippet.test.TestSnippetProject.suite());
85         suite.addTest(net.firstpartners.nounit.snippet.test.TestSnippetCalls.suite());
86         
87         //Reader Tests
88
suite.addTest(net.firstpartners.nounit.reader.bytecode.test.TestByteCodeMethodSnippetFactory.suite());
89         suite.addTest(net.firstpartners.nounit.reader.bytecode.test.TestByteCodeClassSnippetFactory.suite());
90         suite.addTest(net.firstpartners.nounit.reader.bytecode.test.TestByteCodePackageSnippetFactory.suite());
91         suite.addTest(net.firstpartners.nounit.reader.bytecode.test.TestByteCodeProjectSnippetFactory.suite());
92         suite.addTest(net.firstpartners.nounit.reader.bytecode.test.TestByteCodeCallsSnippetFactory.suite());
93         
94         //Reports
95
suite.addTest(net.firstpartners.nounit.report.process.test.TestCallChainer.suite());
96         
97         return suite;
98         
99     }
100     
101     
102     
103 }
104
Popular Tags