public class RhnMockStrutsTestCase
extends servletunit.struts.MockStrutsTestCase
| Constructor and Description |
|---|
RhnMockStrutsTestCase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDispatchCall(java.lang.String key)
Add a request param to simulate a button click on one
of your dispatch actions.
|
protected void |
addSelectedItem(java.lang.Long id)
Util method to add an "ID" to be selected on a list page.
|
protected void |
addSubmitted() |
protected void |
assertBadParamException() |
protected void |
assertException() |
protected void |
assertLookupException() |
protected void |
assertPermissionException() |
protected void |
commitAndCloseSession()
PLEASE Refrain from using this unless you really have to.
|
protected servletunit.ServletContextSimulator |
getContext() |
void |
setUp() |
protected void |
tearDown()
Tears down the fixture, and closes the HibernateSession.
|
protected void |
verifyActionMessage(java.lang.String key)
Util to check to see that a message is in the response.
|
protected void |
verifyFormList(java.lang.String attribName,
java.lang.Class classIn)
Verify that the attribute "pageList" is setup properly:
1) not null
2) size greater than 0
3) first item in list is instance of classIn
|
protected void |
verifyFormValue(java.lang.String name,
java.lang.Object expectedValue)
Check the Form to make sure it contains a value
|
protected void |
verifyList(java.lang.String attribName,
java.lang.Class classIn)
Verify that the attribute "pageList" is setup properly:
1) not null
2) size greater than 0
3) first item in list is instance of classIn
|
protected void |
verifyPageList(java.lang.Class classIn)
Verify that the attribute "pageList" is setup properly:
1) not null
2) size greater than 0
3) first item in list is instance of classIn
|
actionPerform, addRequestParameter, addRequestParameter, clearRequestParameters, getActionForm, getActionServlet, getActualForward, getMockRequest, getMockResponse, getRequest, getRequestWrapper, getResponse, getResponseWrapper, getSession, setActionForm, setActionServlet, setConfigFile, setConfigFile, setContextDirectory, setInitParameter, setRequestPathInfo, setRequestPathInfo, setRequestWrapper, setResponseWrapper, setServletConfigFile, verifyActionErrors, verifyActionMessages, verifyForward, verifyForwardPath, verifyInputForward, verifyInputTilesForward, verifyNoActionErrors, verifyNoActionMessages, verifyTilesForwardassertEquals, 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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringprotected User user
public void setUp()
throws java.lang.Exception
setUp in class servletunit.struts.MockStrutsTestCasejava.lang.Exceptionprotected void tearDown()
throws java.lang.Exception
tearDown in class servletunit.struts.MockStrutsTestCasejava.lang.Exceptionprotected servletunit.ServletContextSimulator getContext()
protected void verifyFormValue(java.lang.String name,
java.lang.Object expectedValue)
name - of parameterexpectedValue - expectedprotected void addSelectedItem(java.lang.Long id)
id - you want to addprotected void addDispatchCall(java.lang.String key)
key - to the button. See your Struts Action method: processMethodKeys()protected void verifyList(java.lang.String attribName,
java.lang.Class classIn)
attribName - name of list in Request attributesclassIn - to check first item against.protected void verifyPageList(java.lang.Class classIn)
classIn - to check first item against.protected void verifyFormList(java.lang.String attribName,
java.lang.Class classIn)
attribName - name of list in Request attributesclassIn - to check first item against.protected void verifyActionMessage(java.lang.String key)
key - to the message.protected void addSubmitted()
protected void assertBadParamException()
protected void assertLookupException()
protected void assertPermissionException()
protected void assertException()
protected void commitAndCloseSession()
throws org.hibernate.HibernateException
org.hibernate.HibernateException - Hibernate exception