Package org.gatein.pc.test.unit
Class TestAction
java.lang.Object
org.gatein.pc.test.unit.TestAction
- Direct Known Subclasses:
PortletActionTestAction,PortletEventTestAction,PortletRenderTestAction,PortletResourceTestAction,PortletTestAction,ServletServiceTestAction
- Version:
- $Revision: 7018 $
- Author:
- Boleslaw Dawidowicz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidCheck that the two parameter maps are equals.protected final voidassertParameterMap(Map<String, String[]> expectedMap, javax.portlet.PortletRequest request) Check that the parameter map contains the value expected.createCookieMap(javax.portlet.PortletRequest request) Build a cookie map from the request.protected final org.exoplatform.services.log.Log
-
Constructor Details
-
TestAction
public TestAction()
-
-
Method Details
-
getLogger
protected final org.exoplatform.services.log.Log getLogger() -
assertParameterMap
protected final void assertParameterMap(Map<String, String[]> expectedMap, javax.portlet.PortletRequest request) throws AssertionErrorCheck that the parameter map contains the value expected. The check is done with the different ways that thePortletRequestAPI provides:PortletRequest.getParameter(String)PortletRequest.getParameterValues(String)PortletRequest.getParameterNames()PortletRequest.getParameterMap()
- Parameters:
expectedMap- the expected maprequest- the actual portlet request- Throws:
AssertionError- if the provided request does not match the expected map state
-
assertParameterMap
protected final void assertParameterMap(Map<String, String[]> expectedMap, Map<String, throws AssertionErrorString[]> map) Check that the two parameter maps are equals.- Parameters:
expectedMap- the expected mapmap- the actual map- Throws:
AssertionError- if the provided map is not equals to the expected map
-
createCookieMap
Build a cookie map from the request.- Parameters:
request- the request- Returns:
- the cookie map
-