1
|
|
/* Generated by AspectJ version 1.0.5 */
|
2
|
|
package org.apache.cactus;
|
3
|
|
import javax.servlet.jsp.JspWriter;
|
4
|
|
import org.apache.cactus.client.JspHttpClient;
|
5
|
|
import org.apache.cactus.server.PageContextWrapper;
|
6
|
|
|
7
|
|
/**
|
8
|
|
* Test classes that need access to valid JSP implicit objects (such as the
|
9
|
|
* page context, the output jsp writer, the HTTP request, ...) must subclass
|
10
|
|
* this class.
|
11
|
|
*
|
12
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
13
|
|
*
|
14
|
|
* @version $Id: JspTestCase.html,v 1.1 2003/04/14 12:27:31 sinisa Exp $
|
15
|
|
*/
|
16
|
|
public class JspTestCase extends ServletTestCase {
|
17
|
|
/**
|
18
|
|
* Valid <code>PageContext</code> object that you can access from
|
19
|
|
* the <code>testXXX()</code>, <code>setUp</code> and
|
20
|
|
* <code>tearDown()</code> methods. If you try to access it from either the
|
21
|
|
* <code>beginXXX()</code> or <code>endXXX()</code> methods it will
|
22
|
|
* have the <code>null</code> value.
|
23
|
|
*/
|
24
|
|
public PageContextWrapper pageContext;
|
25
|
|
/**
|
26
|
|
* Valid <code>JspWriter</code> object that you can access from
|
27
|
|
* the <code>testXXX()</code>, <code>setUp</code> and
|
28
|
|
* <code>tearDown()</code> methods. If you try to access it from either the
|
29
|
|
* <code>beginXXX()</code> or <code>endXXX()</code> methods it will
|
30
|
|
* have the <code>null</code> value.
|
31
|
|
*/
|
32
|
|
public JspWriter out;
|
33
|
|
/**
|
34
|
|
* Constructs a JUnit test case with the given name.
|
35
|
|
*
|
36
|
|
* @param theName the name of the test case
|
37
|
|
*/
|
38
|
60
|
public JspTestCase(String theName) {
|
39
|
60
|
super(theName);
|
40
|
|
;
|
41
|
|
}
|
42
|
|
/**
|
43
|
|
* Runs a test case. This method is overriden from the JUnit
|
44
|
|
* <code>TestCase</code> class in order to seamlessly call the
|
45
|
|
* Cactus redirection servlet.
|
46
|
|
*
|
47
|
|
* @exception Throwable if any error happens during the execution of
|
48
|
|
* the test
|
49
|
|
*/
|
50
|
30
|
protected void runTest() throws Throwable {
|
51
|
30
|
this.runGenericTest(new JspHttpClient());
|
52
|
|
}
|
53
|
|
|
54
|
|
}
|