1 /*
2 * ========================================================================
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership.
7 * The ASF licenses this file to You under the Apache License, Version 2.0
8 * (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 * ========================================================================
20 */
21 package org.apache.cactus;
22
23 import org.apache.cactus.internal.AbstractTestSuite;
24
25 import junit.framework.Test;
26
27 /**
28 * {@link junit.framework.TestSuite} wrapper that wraps all the tests of the
29 * suite in Cactus {@link ServletTestCase} objects.
30 *
31 * @version $Id: ServletTestSuite.java 238991 2004-05-22 11:34:50Z vmassol $
32 * @since 1.5
33 */
34 public class ServletTestSuite extends AbstractTestSuite
35 {
36 /**
37 * {@inheritDoc}
38 * @see AbstractTestSuite#AbstractTestSuite()
39 */
40 public ServletTestSuite()
41 {
42 }
43
44 /**
45 * {@inheritDoc}
46 * @see AbstractTestSuite#AbstractTestSuite(Class)
47 */
48 public ServletTestSuite(final Class theClass)
49 {
50 super(theClass);
51 }
52
53 /**
54 * {@inheritDoc}
55 * @see AbstractTestSuite#AbstractTestSuite(String)
56 */
57 public ServletTestSuite(String theName)
58 {
59 super(theName);
60 }
61
62 /**
63 * {@inheritDoc}
64 * @see AbstractTestSuite#addTest(Test)
65 *
66 * Note: This method is overriden from {@link AbstractTestSuite} because
67 * we do not want to create a binary dependency on end user classes
68 * with {@link AbstractTestSuite}.
69 */
70 public void addTest(Test theTest)
71 {
72 super.addTest(theTest);
73 }
74
75 /**
76 * {@inheritDoc}
77 * @see AbstractTestSuite#addTestSuite(Class)
78 *
79 * Note: This method is overriden from {@link AbstractTestSuite} because
80 * we do not want to create a binary dependency on end user classes
81 * with {@link AbstractTestSuite}.
82 */
83 public void addTestSuite(Class theTestClass)
84 {
85 super.addTestSuite(theTestClass);
86 }
87
88 /**
89 * {@inheritDoc}
90 * @see AbstractTestSuite#createTestSuite(Class)
91 */
92 protected Test createTestSuite(Class theTestClass)
93 {
94 return new ServletTestSuite(theTestClass);
95 }
96
97 /**
98 * {@inheritDoc}
99 * @see AbstractTestSuite#createCactusTestCase(String, Test)
100 */
101 protected Test createCactusTestCase(String theName, Test theTest)
102 {
103 return new ServletTestCase(theName, theTest);
104 }
105 }