public class ActionHelper
extends junit.framework.Assert
| Constructor and Description |
|---|
ActionHelper() |
| Modifier and Type | Method and Description |
|---|---|
ForwardWrapper |
executeAction()
Execute the Action and check for success
|
ForwardWrapper |
executeAction(java.lang.String methodName)
Execute the Action and check for success.
|
ForwardWrapper |
executeAction(java.lang.String methodName,
boolean successCheck)
Execute the Action and check for success.
|
RhnMockDynaActionForm |
getForm()
Get the Form associated with this test
|
org.apache.struts.action.ActionMapping |
getMapping()
Return the ActionMapping used by the Action
|
RhnMockHttpServletRequest |
getRequest()
Get the Request associated with this test
|
RhnMockHttpServletResponse |
getResponse()
Get the response used by the helper.
|
User |
getUser()
Get the User associated with this test
|
void |
setExpectedForward(java.lang.String name)
Sets the expected forward to an ActionForward with the
specified name and adds this forward to the mapping
|
void |
setUpAction(org.apache.struts.action.Action actionIn)
Setup the Action with the proper Request, Form, Response, etc...
|
void |
setUpAction(org.apache.struts.action.Action actionIn,
java.lang.String expectedForwardName)
Setup the Action with the proper Request, Form, Response.
|
void |
setupClampListBounds()
Necessary setup for an action that calls
clampListBounds. |
void |
setupClampListBounds(java.lang.String filterString)
Necessary setup for an action that calls
clampListBounds. |
void |
setupListSelection(java.lang.String listName)
Setup the request parameters for ListSelection
|
void |
setupProcessPagination()
Setup request parameters that are often used by
listview Actions.
|
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, formatpublic void setUpAction(org.apache.struts.action.Action actionIn)
throws java.lang.Exception
actionIn - The Action we want to setup to test.java.lang.Exception - if error occurs setting up the Action.public void setUpAction(org.apache.struts.action.Action actionIn,
java.lang.String expectedForwardName)
throws java.lang.Exception
actionIn - The Action we want to setup to test.expectedForwardName - expected name of the forward you want the Action
to generate.java.lang.Exception - if error occurs setting up the Action.public ForwardWrapper executeAction(java.lang.String methodName) throws java.lang.Exception
methodName - the name of the method you want to execute
in the Action. If not specified, will call execute()java.lang.Exception - if error occurs executing Action.public ForwardWrapper executeAction(java.lang.String methodName, boolean successCheck) throws java.lang.Exception
methodName - the name of the method you want to execute
in the Action. If not specified, will call execute()successCheck - validate expected ActionForward herejava.lang.Exception - if error occurs executing Action.public ForwardWrapper executeAction() throws java.lang.Exception
java.lang.Exception - if error occurs executing Action.public RhnMockHttpServletResponse getResponse()
public RhnMockHttpServletRequest getRequest()
public RhnMockDynaActionForm getForm()
public User getUser()
public org.apache.struts.action.ActionMapping getMapping()
public void setupClampListBounds()
clampListBounds. Declares necessary request parameters and sets
them to moderately bogus values.public void setupClampListBounds(java.lang.String filterString)
clampListBounds. Declares necessary request parameters and sets
them to moderately bogus values. This version allows you to specify
a filter string.filterString - the filter string we want to test out.public void setupProcessPagination()
public void setupListSelection(java.lang.String listName)
listName - The name of the list, from
com.redhat.rhn.frontend.taglibs.list.ListTagpublic void setExpectedForward(java.lang.String name)
name - The name of the expected forward