|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.cactus.AbstractTestCase
org.apache.cactus.AbstractWebTestCase
org.apache.cactus.ServletTestCase
com.jcorporate.expresso.services.test.ControllerTestCase
Base class for testing controllers. Provides an integration with Expresso, JUnit and Cactus
| Field Summary |
| Fields inherited from class org.apache.cactus.ServletTestCase |
config, request, response, session |
| Fields inherited from class org.apache.cactus.AbstractTestCase |
BEGIN_METHOD_PREFIX, END_METHOD_PREFIX, LOG_CLIENT_CONFIG, TEST_METHOD_PREFIX |
| Constructor Summary | |
ControllerTestCase(String testName,
Class controllerClass)
Instantiates a Controller Test Case |
|
ControllerTestCase(String testName,
String controllerName)
Instantiates the ControllerTestCase. |
|
| Method Summary | |
ControllerResponse |
buildControllerResponse(org.w3c.dom.Document d)
Deprecated. |
ControllerResponse |
buildControllerResponse(org.apache.cactus.WebResponse theConnection)
Deprecated. |
ControllerResponse |
controllerProcess()
Run the target controller. |
protected org.apache.log4j.Category |
getLog()
returns a controller test case Log4j Category for your own easy logging without having to do special initialization etc. |
org.w3c.dom.NodeList |
getNodes(org.w3c.dom.Document d,
String xpath)
Deprecated. |
void |
logIn(org.apache.cactus.WebRequest theRequest)
Uses the default setup that a blank database has the security of Admin User = Admin Admin Password = Blank |
void |
logIn(org.apache.cactus.WebRequest theRequest,
String userName,
String password)
Allows special capabilities of logging in using a specially defined username and password. |
org.w3c.dom.Document |
parseResponse(org.apache.cactus.WebResponse response)
Deprecated. |
void |
setupParameters(String state,
org.apache.cactus.WebRequest request)
Called to set the appropriate states for the controller Also makes sure that parameters are set up so that the controller responds in unprocessed XML, and not standard HTML |
| Methods inherited from class org.apache.cactus.ServletTestCase |
runTest |
| Methods inherited from class org.apache.cactus.AbstractWebTestCase |
callEndMethod, runGenericTest |
| Methods inherited from class org.apache.cactus.AbstractTestCase |
callBeginMethod, getBeginMethodName, getCurrentTestMethod, getEndMethodName, getLogger, runBare, runBareServerTest, runServerTest |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, setName, setUp, tearDown, toString |
| 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, wait, wait, wait |
| Constructor Detail |
public ControllerTestCase(String testName,
String controllerName)
throws Exception
testName - the name of the test. Usually handed down by the frameworkcontrollerName - The classname of the controller that we're testing.
Exception - if something happens in the system initialization or potentially
if the controller name passed doesn't map to a real class
public ControllerTestCase(String testName,
Class controllerClass)
throws Exception
testName - the name of the test. Usually handed down by the frameworkcontrollerClass - The class of the controller to test| Method Detail |
protected org.apache.log4j.Category getLog()
public void logIn(org.apache.cactus.WebRequest theRequest)
throws Exception
Exception
public void logIn(org.apache.cactus.WebRequest theRequest,
String userName,
String password)
throws Exception
Exception
public void setupParameters(String state,
org.apache.cactus.WebRequest request)
public org.w3c.dom.Document parseResponse(org.apache.cactus.WebResponse response)
throws Exception
Exceptionpublic ControllerResponse buildControllerResponse(org.w3c.dom.Document d)
d - The DOM document to parse. Root node must be controller-response
public ControllerResponse buildControllerResponse(org.apache.cactus.WebResponse theConnection)
throws Exception
Exception
public ControllerResponse controllerProcess()
throws ServletException,
IOException,
Exception
ServletException
IOException
Exception
public org.w3c.dom.NodeList getNodes(org.w3c.dom.Document d,
String xpath)
|
Expresso 5-5-0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||