| |
|
| org.apache.cactus.internal.client.ClientTestCaseCaller
ClientTestCaseCaller | public class ClientTestCaseCaller extends Assert (Code) | | Provides the ability to run common code before and after each test on the
client side. All the methods provided are independent of any communication
protocol between client side and server side (HTTP, JMS, etc). Any protocol
dependent methods must be provided and implemented in the
ProtocolHandler implementation class.
version: $Id: ClientTestCaseCaller.java 238991 2004-05-22 11:34:50Z vmassol $ |
Method Summary | |
public void | callBeginMethod(Request theRequest) Call the test case begin method. | public Object | callEndMethod(Request theRequest, ResponseObjectFactory theResponseFactory) Call the test case end method
Parameters: theRequest - the request data that were used to open theconnection. Parameters: theResponseFactory - the factory to use to return response objects. | public void | callGlobalBeginMethod(Request theRequest) Call the global begin method. | final public Log | getLogger() | public void | runBareInit() Perform client side initializations before each test, such as
re-initializating the logger and printing some logging information. | public void | runTest() Execute begin and end methods and calls the different
ProtocolHandler lifecycle methods to execute the test
on the server side. |
BEGIN_METHOD_PREFIX | final protected static String BEGIN_METHOD_PREFIX(Code) | | The prefix of a begin test method.
|
CLIENT_GLOBAL_BEGIN_METHOD | final protected static String CLIENT_GLOBAL_BEGIN_METHOD(Code) | | The name of the method that is called before each test on the client
side (if it exists).
|
CLIENT_GLOBAL_END_METHOD | final protected static String CLIENT_GLOBAL_END_METHOD(Code) | | The name of the method that is called after each test on the client
side (if it exists).
|
END_METHOD_PREFIX | final protected static String END_METHOD_PREFIX(Code) | | The prefix of an end test method.
|
TEST_METHOD_PREFIX | final protected static String TEST_METHOD_PREFIX(Code) | | The prefix of a test method.
|
ClientTestCaseCaller | public ClientTestCaseCaller(Test theDelegatedTest, Test theWrappedTest, ProtocolHandler theProtocolHandler)(Code) | | Parameters: theDelegatedTest - the test we are delegating for Parameters: theWrappedTest - the test being wrapped by this delegate (or null if none) Parameters: theProtocolHandler - the protocol handler to use to execute the tests on the server side |
callBeginMethod | public void callBeginMethod(Request theRequest) throws Throwable(Code) | | Call the test case begin method.
Parameters: theRequest - the request object to pass to the begin method. exception: Throwable - any error that occurred when calling the beginmethod for the current test case. |
callEndMethod | public Object callEndMethod(Request theRequest, ResponseObjectFactory theResponseFactory) throws Throwable(Code) | | Call the test case end method
Parameters: theRequest - the request data that were used to open theconnection. Parameters: theResponseFactory - the factory to use to return response objects. the created Reponse object exception: Throwable - any error that occurred when calling the end methodfor the current test case. |
callGlobalBeginMethod | public void callGlobalBeginMethod(Request theRequest) throws Throwable(Code) | | Call the global begin method. This is the method that is called before
each test if it exists. It is called on the client side only.
Parameters: theRequest - the request object which will contain data that willbe used to connect to the Cactus server side redirectors. exception: Throwable - any error that occurred when calling the method |
getLogger | final public Log getLogger()(Code) | | The logger used by the TestCase class andsubclasses to perform logging. |
runBareInit | public void runBareInit()(Code) | | Perform client side initializations before each test, such as
re-initializating the logger and printing some logging information.
|
runTest | public void runTest() throws Throwable(Code) | | Execute begin and end methods and calls the different
ProtocolHandler lifecycle methods to execute the test
on the server side.
Note that this method is overriden from the JUnit
junit.framework.TestCase class in order to prevent JUnit from
calling the
junit.framework.TestCase.setUp and
junit.framework.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.
exception: Throwable - if any error happens during the execution ofthe test |
|
|
|