|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
org.apache.cactus.internal.client.ClientTestCaseCaller
public class ClientTestCaseCaller
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.
Field Summary | |
---|---|
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 Summary | |
---|---|
ClientTestCaseCaller(junit.framework.Test theDelegatedTest,
junit.framework.Test theWrappedTest,
ProtocolHandler theProtocolHandler)
|
Method Summary | |
---|---|
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. |
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, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
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 sideMethod Detail |
---|
public 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 method
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |