org.apache.cactus
Class JspTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.cactus.ServletTestCase
              extended byorg.apache.cactus.JspTestCase
All Implemented Interfaces:
junit.framework.Test

public class JspTestCase
extends ServletTestCase

Test classes that need access to valid JSP implicit objects (such as the page context, the output jsp writer, the HTTP request, ...) must subclass this class.

Version:
$Id: JspTestCase.java,v 1.13 2003/07/12 19:31:41 vmassol Exp $
Author:
Vincent Massol

Field Summary
 javax.servlet.jsp.JspWriter out
          Valid JspWriter object that you can access from the testXXX(), setUp and tearDown() methods.
 PageContextWrapper pageContext
          Valid PageContext object that you can access from the testXXX(), setUp and tearDown() methods.
 
Fields inherited from class org.apache.cactus.ServletTestCase
config, request, response, session
 
Constructor Summary
JspTestCase()
          Default constructor defined in order to allow creating Test Case without needing to define constructor (new feature in JUnit 3.8.1).
JspTestCase(java.lang.String theName)
          Constructs a JUnit test case with the given name.
JspTestCase(java.lang.String theName, junit.framework.Test theTest)
          Wraps a pure JUnit Test Case in a Cactus Test Case.
 
Methods inherited from class org.apache.cactus.ServletTestCase
runBare, runTest
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pageContext

public PageContextWrapper pageContext
Valid PageContext object that you can access from the testXXX(), setUp and tearDown() methods. If you try to access it from either the beginXXX() or endXXX() methods it will have the null value.


out

public javax.servlet.jsp.JspWriter out
Valid JspWriter object that you can access from the testXXX(), setUp and tearDown() methods. If you try to access it from either the beginXXX() or endXXX() methods it will have the null value.

Constructor Detail

JspTestCase

public JspTestCase()
Default constructor defined in order to allow creating Test Case without needing to define constructor (new feature in JUnit 3.8.1). Should only be used with JUnit 3.8.1 or greater.

Since:
1.5

JspTestCase

public JspTestCase(java.lang.String theName)
Constructs a JUnit test case with the given name.

Parameters:
theName - the name of the test case

JspTestCase

public JspTestCase(java.lang.String theName,
                   junit.framework.Test theTest)
Wraps a pure JUnit Test Case in a Cactus Test Case.

Parameters:
theName - the name of the test
theTest - the Test Case class to wrap
Since:
1.5


Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.