01: /*
02: * ========================================================================
03: *
04: * Copyright 2001-2004 The Apache Software Foundation.
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: *
18: * ========================================================================
19: */
20: package org.apache.cactus;
21:
22: import org.apache.cactus.internal.TestAbstractCactusTestCase;
23: import org.apache.cactus.internal.TestWebTestResult;
24: import org.apache.cactus.internal.client.TestWebTestResultParser;
25: import org.apache.cactus.internal.configuration.ConfigurationInitializer;
26: import org.apache.cactus.internal.server.TestServletUtil;
27: import org.apache.cactus.internal.server.runner.TestXMLFormatter;
28: import org.apache.cactus.internal.util.TestCookieUtil;
29: import org.apache.cactus.internal.util.TestIoUtil;
30: import org.apache.cactus.internal.util.TestStringUtil;
31: import org.apache.cactus.internal.util.TestTestCaseImplementChecker;
32: import org.apache.cactus.internal.util.TestUniqueGenerator;
33: import org.apache.cactus.server.runner.TestServletTestRunner;
34:
35: import junit.framework.Test;
36: import junit.framework.TestSuite;
37:
38: /**
39: * Run all the unit tests of Cactus that do not need a servlet
40: * environment to run. These other tests will be exercised in the sample
41: * application.
42: *
43: * @version $Id: TestShareAll.java 238991 2004-05-22 11:34:50Z vmassol $
44: */
45: public class TestShareAll {
46: /**
47: * @return a test suite (<code>TestSuite</code>) that includes all shared
48: * tests
49: * @exception Exception on failure to load the cactus properties file
50: */
51: public static Test suite() throws Exception {
52: TestSuite suite = new TestSuite(
53: "Cactus unit tests for all J2EE APIs");
54:
55: // Make sure logging configuration properties are initialized so
56: // that it is possible to control logging from the outside of the
57: // tests.
58: ConfigurationInitializer.initialize();
59:
60: suite.addTestSuite(TestNoNameTestCase.class);
61: suite.addTestSuite(TestServletURL.class);
62: suite.addTestSuite(TestWebRequest.class);
63:
64: suite.addTestSuite(TestAbstractCactusTestCase.class);
65: suite.addTestSuite(TestWebTestResult.class);
66:
67: suite.addTestSuite(TestWebTestResultParser.class);
68:
69: suite.addTestSuite(TestServletUtil.class);
70:
71: suite.addTestSuite(TestXMLFormatter.class);
72:
73: suite.addTestSuite(TestCookieUtil.class);
74: suite.addTestSuite(TestIoUtil.class);
75: suite.addTestSuite(TestStringUtil.class);
76: suite.addTestSuite(TestTestCaseImplementChecker.class);
77: suite.addTestSuite(TestUniqueGenerator.class);
78:
79: suite.addTestSuite(TestServletTestRunner.class);
80:
81: return suite;
82: }
83: }
|