public class ClientTestCaseCaller
extends junit.framework.Assert
ProtocolHandler
implementation class.Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
BEGIN_METHOD_PREFIX
The prefix of a begin test method.
|
protected static java.lang.String |
CLIENT_GLOBAL_BEGIN_METHOD
The name of the method that is called before each test on the client
side (if it exists).
|
protected static java.lang.String |
CLIENT_GLOBAL_END_METHOD
The name of the method that is called after each test on the client
side (if it exists).
|
protected static java.lang.String |
END_METHOD_PREFIX
The prefix of an end test method.
|
protected static java.lang.String |
TEST_METHOD_PREFIX
The prefix of a test method.
|
Constructor and Description |
---|
ClientTestCaseCaller(junit.framework.Test theDelegatedTest,
junit.framework.Test theWrappedTest,
ProtocolHandler theProtocolHandler) |
Modifier and Type | Method and Description |
---|---|
void |
callBeginMethod(Request theRequest)
Call the test case begin method.
|
java.lang.Object |
callEndMethod(Request theRequest,
ResponseObjectFactory theResponseFactory)
Call the test case end method
|
void |
callGlobalBeginMethod(Request theRequest)
Call the global begin method.
|
org.apache.commons.logging.Log |
getLogger() |
void |
runBareInit()
Perform client side initializations before each test, such as
re-initializating the logger and printing some logging information.
|
void |
runTest()
Execute begin and end methods and calls the different
ProtocolHandler lifecycle methods to execute the test
on the server side. |
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, failNotEquals, failNotSame, failSame
protected static final java.lang.String TEST_METHOD_PREFIX
protected static final java.lang.String BEGIN_METHOD_PREFIX
protected static final java.lang.String END_METHOD_PREFIX
protected static final java.lang.String CLIENT_GLOBAL_BEGIN_METHOD
protected static final java.lang.String CLIENT_GLOBAL_END_METHOD
public ClientTestCaseCaller(junit.framework.Test theDelegatedTest, junit.framework.Test theWrappedTest, ProtocolHandler theProtocolHandler)
theDelegatedTest
- the test we are delegating fortheWrappedTest
- the test being wrapped by this delegate (or null
if none)theProtocolHandler
- the protocol handler to use to execute the
tests on the server sidepublic void runTest() throws java.lang.Throwable
ProtocolHandler
lifecycle methods to execute the test
on the server side.
Note that this method is overriden from the JUnit
TestCase
class in order to prevent JUnit from
calling the TestCase.setUp()
and
TestCase.tearDown()
methods on the client side.
instead we are calling the server redirector proxy and the setup and
teardown methods will be executed on the server side.java.lang.Throwable
- if any error happens during the execution of
the testpublic final org.apache.commons.logging.Log getLogger()
TestCase
class and
subclasses to perform logging.public void runBareInit()
public void callBeginMethod(Request theRequest) throws java.lang.Throwable
theRequest
- the request object to pass to the begin method.java.lang.Throwable
- any error that occurred when calling the begin
method for the current test case.public java.lang.Object callEndMethod(Request theRequest, ResponseObjectFactory theResponseFactory) throws java.lang.Throwable
theRequest
- the request data that were used to open the
connection.theResponseFactory
- the factory to use to return response objects.java.lang.Throwable
- any error that occurred when calling the end method
for the current test case.public void callGlobalBeginMethod(Request theRequest) throws java.lang.Throwable
theRequest
- the request object which will contain data that will
be used to connect to the Cactus server side redirectors.java.lang.Throwable
- any error that occurred when calling the methodCopyright © 2000-2004 Apache Software Foundation. All Rights Reserved.