|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert org.apache.cactus.internal.client.ClientTestCaseDelegate org.apache.cactus.internal.client.WebClientTestCaseDelegate
Delegator extension to support test cases using the HTTP protocol. It adds support for end methods (as they are dependent on the protocol used, which is HTTP here).
Field Summary |
Fields inherited from class org.apache.cactus.internal.client.ClientTestCaseDelegate |
BEGIN_METHOD_PREFIX, CLIENT_GLOBAL_BEGIN_METHOD, CLIENT_GLOBAL_END_METHOD, END_METHOD_PREFIX, TEST_METHOD_PREFIX |
Constructor Summary | |
WebClientTestCaseDelegate(junit.framework.Test theDelegatedTest,
junit.framework.Test theWrappedTest,
Configuration theConfiguration)
|
Method Summary | |
protected void |
callClientGlobalEnd(WebRequest theRequest,
java.net.HttpURLConnection theConnection,
java.lang.Object theResponse)
Call the client tear down up method if it exists. |
java.lang.Object |
callEndMethod(WebRequest theRequest,
java.net.HttpURLConnection theConnection)
Call the test case end method |
protected void |
runGenericTest(DefaultHttpClient theHttpClient)
Execute the test case begin method, then connect to the server proxy redirector (where the test case test method is executed) and then executes the test case end method. |
void |
runTest()
Runs a test case. |
Methods inherited from class org.apache.cactus.internal.client.ClientTestCaseDelegate |
callBeginMethod, callClientGlobalBegin, getBeginMethodName, getConfiguration, getCurrentTestMethod, getCurrentTestName, getDelegatedTest, getEndMethodName, getLogger, getWrappedTest, getWrappedTestName, isWrappingATest, runBareInit, setConfiguration, setDelegatedTest, setLogger, setWrappedTest |
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, toString, wait, wait, wait |
Constructor Detail |
public WebClientTestCaseDelegate(junit.framework.Test theDelegatedTest, junit.framework.Test theWrappedTest, Configuration theConfiguration)
theDelegatedTest
- the test we are delegating fortheWrappedTest
- the test being wrapped by this delegator (or null
if none)theConfiguration
- the configuration to useMethod Detail |
protected void callClientGlobalEnd(WebRequest theRequest, java.net.HttpURLConnection theConnection, java.lang.Object theResponse) throws java.lang.Throwable
theRequest
- the request data that were used to open the
connection.theConnection
- the HttpURLConnection
that was used
to open the connection to the redirection servlet. The response
codes, headers, cookies can be checked using the get methods of
this object.theResponse
- the Response object if it exists. Can be null in
which case it is created from the HttpURLConnection
java.lang.Throwable
- any error that occurred when calling the methodpublic java.lang.Object callEndMethod(WebRequest theRequest, java.net.HttpURLConnection theConnection) throws java.lang.Throwable
theRequest
- the request data that were used to open the
connection.theConnection
- the HttpURLConnection
that was used
to open the connection to the redirection servlet. The response
codes, headers, cookies can be checked using the get methods of
this object.
java.lang.Throwable
- any error that occurred when calling the end method
for the current test case.public void runTest() throws java.lang.Throwable
TestCase
class in order to seamlessly call the
Cactus redirection servlet.
java.lang.Throwable
- if any error happens during the execution of
the testprotected void runGenericTest(DefaultHttpClient theHttpClient) throws java.lang.Throwable
theHttpClient
- the HTTP client class to use to connect to the
proxy redirector.
java.lang.Throwable
- any error that occurred when calling the test method
for the current test case.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |