KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > latka > junit > TestAll


1 /*
2  * Copyright 1999-2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.commons.latka.junit;
18
19 import junit.framework.Test;
20 import junit.framework.TestCase;
21 import junit.framework.TestSuite;
22
23 /**
24  * @author Chuck Burdick
25  * @version $Id: TestAll.java 155424 2005-02-26 13:09:29Z dirkv $
26  */

27 public class TestAll extends TestCase {
28
29     public TestAll(String JavaDoc testName) {
30         super(testName);
31     }
32
33     public static Test suite() {
34         TestSuite suite = new TestSuite();
35         suite.addTest(TestJUnitEventReporter.suite());
36         suite.addTest(TestJUnitTestAdapter.suite());
37         String JavaDoc baseDir = System.getProperty("basedir");
38         assertNotNull("The system property basedir was not defined.", baseDir);
39         String JavaDoc fs = System.getProperty("file.separator");
40         assertNotNull("The system property file.separator was not defined.", fs);
41         String JavaDoc fileName = baseDir + fs + "src/distribution/tests/samples/TestCommonsWebsite.xml";
42         suite.addTest(JUnitTestAdapter.createTestFromFile(fileName));
43         return suite;
44     }
45
46     public static void main(String JavaDoc args[]) {
47         String JavaDoc[] testCaseName = { TestAll.class.getName() };
48         junit.textui.TestRunner.main(testCaseName);
49     }
50 }
51
Popular Tags