|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork2.XWorkJUnit4TestCase
org.apache.struts2.StrutsJUnit4TestCase<T>
public abstract class StrutsJUnit4TestCase<T>
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
dispatcherInitParams
|
protected org.springframework.mock.web.MockPageContext |
pageContext
|
protected org.springframework.mock.web.MockHttpServletRequest |
request
|
protected org.springframework.core.io.DefaultResourceLoader |
resourceLoader
|
protected org.springframework.mock.web.MockHttpServletResponse |
response
|
protected org.springframework.mock.web.MockServletContext |
servletContext
|
Fields inherited from class com.opensymphony.xwork2.XWorkJUnit4TestCase |
---|
actionProxyFactory, configuration, configurationManager, container |
Constructor Summary | |
---|---|
StrutsJUnit4TestCase()
|
Method Summary | |
---|---|
protected boolean |
containsErrors()
|
protected java.lang.String |
executeAction(java.lang.String uri)
Executes an action and returns it's output (not the result returned from execute()), but the actual output that would be written to the response. |
protected java.lang.Object |
findValueAfterExecute(java.lang.String key)
gets an object from the stack after an action is executed |
protected T |
getAction()
gets an object from the stack after an action is executed |
protected ActionMapping |
getActionMapping(javax.servlet.http.HttpServletRequest request)
Finds an ActionMapping for a given request |
protected ActionMapping |
getActionMapping(java.lang.String url)
Finds an ActionMapping for a given url |
protected ActionProxy |
getActionProxy(java.lang.String uri)
Creates an action proxy for a request, and sets parameters of the ActionInvocation to the passed parameters. |
protected java.lang.String |
getConfigPath()
Override this method to return a comma separated list of paths to a configuration file. |
protected Dispatcher |
initDispatcher(java.util.Map<java.lang.String,java.lang.String> params)
|
protected void |
initDispatcherParams()
|
protected void |
initServletMockObjects()
|
protected void |
injectStrutsDependencies(java.lang.Object object)
Injects dependencies on an Object using Struts internal IoC container |
void |
setUp()
Sets up the configuration settings, XWork configuration, and message resources |
protected void |
setupBeforeInitDispatcher()
|
void |
tearDown()
|
Methods inherited from class com.opensymphony.xwork2.XWorkJUnit4TestCase |
---|
loadButAdd, loadButAdd, loadConfigurationProviders |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.springframework.mock.web.MockHttpServletResponse response
protected org.springframework.mock.web.MockHttpServletRequest request
protected org.springframework.mock.web.MockPageContext pageContext
protected org.springframework.mock.web.MockServletContext servletContext
protected java.util.Map<java.lang.String,java.lang.String> dispatcherInitParams
protected org.springframework.core.io.DefaultResourceLoader resourceLoader
Constructor Detail |
---|
public StrutsJUnit4TestCase()
Method Detail |
---|
protected java.lang.Object findValueAfterExecute(java.lang.String key)
protected T getAction()
protected boolean containsErrors()
protected java.lang.String executeAction(java.lang.String uri) throws javax.servlet.ServletException, java.io.UnsupportedEncodingException
javax.servlet.ServletException
java.io.UnsupportedEncodingException
protected ActionProxy getActionProxy(java.lang.String uri)
protected ActionMapping getActionMapping(javax.servlet.http.HttpServletRequest request)
protected ActionMapping getActionMapping(java.lang.String url)
protected void injectStrutsDependencies(java.lang.Object object)
protected void setupBeforeInitDispatcher() throws java.lang.Exception
java.lang.Exception
protected void initServletMockObjects()
public void setUp() throws java.lang.Exception
setUp
in class XWorkJUnit4TestCase
java.lang.Exception
protected void initDispatcherParams()
protected Dispatcher initDispatcher(java.util.Map<java.lang.String,java.lang.String> params)
protected java.lang.String getConfigPath()
The default implementation simply returns null
.
public void tearDown() throws java.lang.Exception
tearDown
in class XWorkJUnit4TestCase
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |