|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase com.mockrunner.base.BasicWebTestCase com.mockrunner.base.BasicHTMLOutputTestCase com.mockrunner.struts.BasicActionTestCaseAdapter
public abstract class BasicActionTestCaseAdapter
Delegator for ActionTestModule
. You can
subclass this adapter or use ActionTestModule
directly (so your test case can use another base class).
This basic adapter can be used if you don't need any other modules. It
does not extend BaseTestCase
. If you want
to use several modules in conjunction, consider subclassing
ActionTestCaseAdapter
.
This class is generated from the ActionTestModule
and should not be edited directly.
Constructor Summary | |
---|---|
BasicActionTestCaseAdapter()
|
|
BasicActionTestCaseAdapter(java.lang.String name)
|
Methods inherited from class com.mockrunner.base.BasicHTMLOutputTestCase |
---|
getOutput, getOutputAsBufferedReader, getOutputAsJDOMDocument, getOutputAsW3CDocument, getOutputAsWellformedXML, getWebTestModule, setCaseSensitive, verifyOutput, verifyOutputContains, verifyOutputRegularExpression |
Methods inherited from class com.mockrunner.base.BasicWebTestCase |
---|
addRequestParameter, addRequestParameter, addRequestParameter, getRequestAttribute, getRequestParameter, getSessionAttribute, setRequestAttribute, setSessionAttribute |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicActionTestCaseAdapter()
public BasicActionTestCaseAdapter(java.lang.String name)
Method Detail |
---|
protected void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
java.lang.Exception
protected void setUp() throws java.lang.Exception
ActionTestModule
. If you
overwrite this method, you must call super.setUp()
.
setUp
in class junit.framework.TestCase
java.lang.Exception
protected ActionMockObjectFactory createActionMockObjectFactory()
ActionMockObjectFactory
.
ActionMockObjectFactory
protected ActionMockObjectFactory createActionMockObjectFactory(WebMockObjectFactory otherFactory)
createActionMockObjectFactory(otherFactory, true)
.
protected ActionMockObjectFactory createActionMockObjectFactory(WebMockObjectFactory otherFactory, boolean createNewSession)
ActionMockObjectFactory
based on another
WebMockObjectFactory
.
The created ActionMockObjectFactory
will have its own
request and response objects. If you set createNewSession
to true
it will also have its own session object.
The two factories will share one ServletContext
.
Especially important for multithreading tests.
If you set createNewSession to false, the two factories
will share one session. This setting simulates multiple requests
from the same client.
otherFactory
- the other factorycreateNewSession
- create a new session for the new factory
ActionMockObjectFactory
protected ActionMockObjectFactory getActionMockObjectFactory()
ActionMockObjectFactory
.
ActionMockObjectFactory
protected void setActionMockObjectFactory(ActionMockObjectFactory actionMockObjectFactory)
ActionMockObjectFactory
.
actionMockObjectFactory
- the ActionMockObjectFactory
protected ActionTestModule createActionTestModule()
ActionTestModule
based on the current
ActionMockObjectFactory
.
Same as createActionTestModule(getActionMockObjectFactory())
.
ActionTestModule
protected ActionTestModule createActionTestModule(ActionMockObjectFactory mockFactory)
ActionTestModule
with the specified
ActionMockObjectFactory
.
ActionTestModule
protected HTMLOutputModule getHTMLOutputModule()
ActionTestModule
as
HTMLOutputModule
.
getHTMLOutputModule
in class BasicHTMLOutputTestCase
HTMLOutputModule
protected ActionTestModule getActionTestModule()
ActionTestModule
.
ActionTestModule
protected void setActionTestModule(ActionTestModule actionTestModule)
ActionTestModule
.
actionTestModule
- the ActionTestModule
protected void setReset(boolean reset)
ActionTestModule.setReset(boolean)
protected void setDoPopulate(boolean doPopulate)
ActionTestModule.setDoPopulate(boolean)
protected void setRecognizeMessagesInSession(boolean recognizeInSession)
ActionTestModule.setRecognizeMessagesInSession(boolean)
protected void setMessageAttributeKey(java.lang.String messageAttributeKey)
ActionTestModule.setMessageAttributeKey(String)
protected void setErrorAttributeKey(java.lang.String errorAttributeKey)
ActionTestModule.setErrorAttributeKey(String)
protected java.lang.String addMappedPropertyRequestPrefix(java.lang.String property)
ActionTestModule.addMappedPropertyRequestPrefix(String)
protected org.apache.struts.action.ActionMapping getActionMapping()
ActionTestModule.getActionMapping()
protected void setValidate(boolean validate)
ActionTestModule.setValidate(boolean)
protected void addExceptionHandler(ExceptionHandlerConfig handler)
ActionTestModule.addExceptionHandler(ExceptionHandlerConfig)
protected void setResources(org.apache.struts.util.MessageResources resources)
ActionTestModule.setResources(MessageResources)
protected void setResources(java.lang.String key, org.apache.struts.util.MessageResources resources)
ActionTestModule.setResources(String, MessageResources)
protected void setDataSource(javax.sql.DataSource dataSource)
ActionTestModule.setDataSource(DataSource)
protected void setDataSource(java.lang.String key, javax.sql.DataSource dataSource)
ActionTestModule.setDataSource(String, DataSource)
protected org.apache.commons.validator.ValidatorResources createValidatorResources(java.lang.String[] resourcesFiles)
ActionTestModule.createValidatorResources(String[])
protected void setValidatorResources(org.apache.commons.validator.ValidatorResources validatorResources)
ActionTestModule.setValidatorResources(ValidatorResources)
protected void verifyForward(java.lang.String path)
ActionTestModule.verifyForward(String)
protected MockActionForward getActionForward()
ActionTestModule.getActionForward()
protected void verifyForwardName(java.lang.String name)
ActionTestModule.verifyForwardName(String)
protected void verifyRedirect(boolean redirect)
ActionTestModule.verifyRedirect(boolean)
protected void verifyNoActionErrors()
ActionTestModule.verifyNoActionErrors()
protected org.apache.struts.action.ActionMessages getActionErrors()
ActionTestModule.getActionErrors()
protected void verifyNoActionMessages()
ActionTestModule.verifyNoActionMessages()
protected org.apache.struts.action.ActionMessages getActionMessages()
ActionTestModule.getActionMessages()
protected void verifyHasActionErrors()
ActionTestModule.verifyHasActionErrors()
protected void verifyHasActionMessages()
ActionTestModule.verifyHasActionMessages()
protected void verifyActionErrorPresent(java.lang.String errorKey)
ActionTestModule.verifyActionErrorPresent(String)
protected void verifyActionMessagePresent(java.lang.String messageKey)
ActionTestModule.verifyActionMessagePresent(String)
protected void verifyActionErrorNotPresent(java.lang.String errorKey)
ActionTestModule.verifyActionErrorNotPresent(String)
protected void verifyActionMessageNotPresent(java.lang.String messageKey)
ActionTestModule.verifyActionMessageNotPresent(String)
protected void verifyActionErrors(java.lang.String[] errorKeys)
ActionTestModule.verifyActionErrors(String[])
protected void verifyActionMessages(java.lang.String[] messageKeys)
ActionTestModule.verifyActionMessages(String[])
protected void verifyActionErrorValues(java.lang.String errorKey, java.lang.Object[] values)
ActionTestModule.verifyActionErrorValues(String, Object[])
protected org.apache.struts.action.ActionMessage getActionErrorByKey(java.lang.String errorKey)
ActionTestModule.getActionErrorByKey(String)
protected void verifyActionMessageValues(java.lang.String messageKey, java.lang.Object[] values)
ActionTestModule.verifyActionMessageValues(String, Object[])
protected org.apache.struts.action.ActionMessage getActionMessageByKey(java.lang.String messageKey)
ActionTestModule.getActionMessageByKey(String)
protected void verifyActionErrorValue(java.lang.String errorKey, java.lang.Object value)
ActionTestModule.verifyActionErrorValue(String, Object)
protected void verifyActionMessageValue(java.lang.String messageKey, java.lang.Object value)
ActionTestModule.verifyActionMessageValue(String, Object)
protected void verifyActionErrorProperty(java.lang.String errorKey, java.lang.String property)
ActionTestModule.verifyActionErrorProperty(String, String)
protected void verifyActionMessageProperty(java.lang.String messageKey, java.lang.String property)
ActionTestModule.verifyActionMessageProperty(String, String)
protected void verifyNumberActionErrors(int number)
ActionTestModule.verifyNumberActionErrors(int)
protected void verifyNumberActionMessages(int number)
ActionTestModule.verifyNumberActionMessages(int)
protected void setActionMessages(org.apache.struts.action.ActionMessages messages)
ActionTestModule.setActionMessages(ActionMessages)
protected void setActionMessagesToSession(org.apache.struts.action.ActionMessages messages)
ActionTestModule.setActionMessagesToSession(ActionMessages)
protected org.apache.struts.action.ActionMessages getActionMessagesFromRequest()
ActionTestModule.getActionMessagesFromRequest()
protected org.apache.struts.action.ActionMessages getActionMessagesFromSession()
ActionTestModule.getActionMessagesFromSession()
protected boolean hasActionMessages()
ActionTestModule.hasActionMessages()
protected void setActionErrors(org.apache.struts.action.ActionMessages errors)
ActionTestModule.setActionErrors(ActionMessages)
protected void setActionErrorsToSession(org.apache.struts.action.ActionMessages errors)
ActionTestModule.setActionErrorsToSession(ActionMessages)
protected org.apache.struts.action.ActionMessages getActionErrorsFromRequest()
ActionTestModule.getActionErrorsFromRequest()
protected org.apache.struts.action.ActionMessages getActionErrorsFromSession()
ActionTestModule.getActionErrorsFromSession()
protected boolean hasActionErrors()
ActionTestModule.hasActionErrors()
protected MockActionMapping getMockActionMapping()
ActionTestModule.getMockActionMapping()
protected MockPageContext getMockPageContext()
ActionTestModule.getMockPageContext()
protected org.apache.struts.action.Action getLastAction()
ActionTestModule.getLastAction()
protected void generateValidToken()
ActionTestModule.generateValidToken()
protected org.apache.struts.action.ActionForm getActionForm()
ActionTestModule.getActionForm()
protected void setActionForm(org.apache.struts.action.ActionForm formObj)
ActionTestModule.setActionForm(ActionForm)
protected org.apache.struts.action.ActionForm createActionForm(java.lang.Class form)
ActionTestModule.createActionForm(Class)
protected org.apache.struts.action.DynaActionForm createDynaActionForm(org.apache.struts.config.FormBeanConfig formConfig)
ActionTestModule.createDynaActionForm(FormBeanConfig)
protected void populateRequestToForm()
ActionTestModule.populateRequestToForm()
protected org.apache.struts.action.ActionForward actionPerform(java.lang.Class action, java.lang.Class form)
ActionTestModule.actionPerform(Class, Class)
protected org.apache.struts.action.ActionForward actionPerform(java.lang.Class action)
ActionTestModule.actionPerform(Class)
protected org.apache.struts.action.ActionForward actionPerform(org.apache.struts.action.Action action)
ActionTestModule.actionPerform(Action)
protected org.apache.struts.action.ActionForward actionPerform(org.apache.struts.action.Action action, org.apache.struts.action.ActionForm form)
ActionTestModule.actionPerform(Action, ActionForm)
protected org.apache.struts.action.ActionForward actionPerform(org.apache.struts.action.Action action, java.lang.Class form)
ActionTestModule.actionPerform(Action, Class)
protected org.apache.struts.action.ActionForward actionPerform(java.lang.Class action, org.apache.struts.action.ActionForm form)
ActionTestModule.actionPerform(Class, ActionForm)
protected void setLocale(java.util.Locale locale)
ActionTestModule.setLocale(Locale)
protected void setInput(java.lang.String input)
ActionTestModule.setInput(String)
protected void setParameter(java.lang.String parameter)
ActionTestModule.setParameter(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |