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.AbstractTestSuite;
23:
24: import junit.framework.Test;
25:
26: /**
27: * {@link junit.framework.TestSuite} wrapper that wraps all the tests of the
28: * suite in Cactus {@link ServletTestCase} objects.
29: *
30: * @version $Id: ServletTestSuite.java 238991 2004-05-22 11:34:50Z vmassol $
31: * @since 1.5
32: */
33: public class ServletTestSuite extends AbstractTestSuite {
34: /**
35: * @see AbstractTestSuite#AbstractTestSuite()
36: */
37: public ServletTestSuite() {
38: }
39:
40: /**
41: * @see AbstractTestSuite#AbstractTestSuite(Class)
42: */
43: public ServletTestSuite(final Class theClass) {
44: super (theClass);
45: }
46:
47: /**
48: * @see AbstractTestSuite#AbstractTestSuite(String)
49: */
50: public ServletTestSuite(String theName) {
51: super (theName);
52: }
53:
54: /**
55: * @see AbstractTestSuite#addTest(Test)
56: *
57: * Note: This method is overriden from {@link AbstractTestSuite} because
58: * we do not want to create a binary dependency on end user classes
59: * with {@link AbstractTestSuite}.
60: */
61: public void addTest(Test theTest) {
62: super .addTest(theTest);
63: }
64:
65: /**
66: * @see AbstractTestSuite#addTestSuite(Class)
67: *
68: * Note: This method is overriden from {@link AbstractTestSuite} because
69: * we do not want to create a binary dependency on end user classes
70: * with {@link AbstractTestSuite}.
71: */
72: public void addTestSuite(Class theTestClass) {
73: super .addTestSuite(theTestClass);
74: }
75:
76: /**
77: * @see AbstractTestSuite#createTestSuite(Class)
78: */
79: protected Test createTestSuite(Class theTestClass) {
80: return new ServletTestSuite(theTestClass);
81: }
82:
83: /**
84: * @see AbstractTestSuite#createCactusTestCase(String, Test)
85: */
86: protected Test createCactusTestCase(String theName, Test theTest) {
87: return new ServletTestCase(theName, theTest);
88: }
89: }
|