|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--junit.framework.Assert
|
+--junit.framework.TestCase
|
+--j2eeunit.ServletTestCase
Test classes that need access to valid Servlet implicit objects (such as the
the HTTP request, the HTTP response, the servlet config, ...) must subclass
this class. It also provides support for beginXXX and
endXXX() methods.
| Field Summary | |
ServletConfigWrapper |
config
Valid ServletConfig object that you can access from
the testXXX(), setUp and tearDown()
methods. |
java.lang.String |
currentTestMethod
The name of the current test method being executed. |
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. |
javax.servlet.http.HttpSession |
session
Valid HttpSession object that you can access from
the testXXX(), setUp and tearDown()
methods. |
| Constructor Summary | |
ServletTestCase(java.lang.String theName)
Constructs a JUnit test case with the given name. |
|
| Method Summary | |
void |
runBare()
Runs the bare test sequence. |
| Methods inherited from class junit.framework.TestCase |
countTestCases, name, run, run, toString |
| Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, fail, fail |
| Methods inherited from class java.lang.Object |
equals, 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 javax.servlet.http.HttpSession session
HttpSession 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 ServletConfigWrapper config
ServletConfig 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 java.lang.String currentTestMethod
testXXX(), setUp() or
tearDown() method, as well as from beginXXX()
and endXXX() methods.| Constructor Detail |
public ServletTestCase(java.lang.String theName)
theName - the name of the test case| Method Detail |
public void runBare()
throws java.lang.Throwable
TestCase class in order to prevent the latter
to call the setUp() and tearDown() methods
which, in our case, need to be ran in the servlet engine by the
servlet redirector class.runBare in class junit.framework.TestCasejava.lang.Throwable - if any exception is thrown
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||