|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.cactus.FilterTestCase
Test classes that need access to valid Filter implicit objects (such as the
FilterConfig
and FilterChain
objects) must
subclass this class.
Field Summary | |
FilterConfigWrapper |
config
Valid FilterConfig object that you can access from
the testXXX() , setUp and
tearDown() methods. |
javax.servlet.FilterChain |
filterChain
Valid FilterChain object that you can access from
the testXXX() , setUp and
tearDown() methods. |
HttpServletRequestWrapper |
request
Valid HttpServletRequest object that you can access from
the testXXX() , setUp and
tearDown() methods. |
javax.servlet.http.HttpServletResponse |
response
Valid HttpServletResponse object that you can access from
the testXXX() , setUp and
tearDown() methods. |
Constructor Summary | |
FilterTestCase()
Default constructor defined in order to allow creating Test Case without needing to define constructor (new feature in JUnit 3.8.1). |
|
FilterTestCase(java.lang.String theName)
Constructs a JUnit test case with the given name. |
|
FilterTestCase(java.lang.String theName,
junit.framework.Test theTest)
Wraps a pure JUnit Test Case in a Cactus Test Case. |
Method Summary | |
void |
runBare()
Runs the bare test (either on the client side or on the server side). |
protected void |
runCactusTest()
Runs a Cactus test case. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runTest, 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 |
public HttpServletRequestWrapper request
HttpServletRequest
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.
public javax.servlet.http.HttpServletResponse response
HttpServletResponse
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.
public FilterConfigWrapper config
FilterConfig
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.
public javax.servlet.FilterChain filterChain
FilterChain
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 |
public FilterTestCase()
public FilterTestCase(java.lang.String theName)
theName
- the name of the test casepublic FilterTestCase(java.lang.String theName, junit.framework.Test theTest)
theName
- the name of the testtheTest
- the Test Case class to wrapMethod Detail |
public void runBare() throws java.lang.Throwable
TestCase
class in order to prevent the latter to immediatly
call the setUp()
and tearDown()
methods
which, in our case, need to be executed on the server side.
java.lang.Throwable
- if any exception is thrown during the test. Any
exception will be displayed by the JUnit Test Runnerprotected void runCactusTest() throws java.lang.Throwable
java.lang.Throwable
- if any error happens during the execution of
the test
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |