Class TestAction

java.lang.Object
org.gatein.pc.test.unit.TestAction
Direct Known Subclasses:
PortletActionTestAction, PortletEventTestAction, PortletRenderTestAction, PortletResourceTestAction, PortletTestAction, ServletServiceTestAction

public abstract class TestAction extends Object
  • 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 AssertionError
      Check that the parameter map contains the value expected. The check is done with the different ways that the PortletRequest API provides:
      • PortletRequest.getParameter(String)
      • PortletRequest.getParameterValues(String)
      • PortletRequest.getParameterNames()
      • PortletRequest.getParameterMap()
      This method allows a full coverage of the API.
      Parameters:
      expectedMap - the expected map
      request - 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,String[]> map) throws AssertionError
      Check that the two parameter maps are equals.
      Parameters:
      expectedMap - the expected map
      map - the actual map
      Throws:
      AssertionError - if the provided map is not equals to the expected map
    • createCookieMap

      protected final Map<String,String> createCookieMap(javax.portlet.PortletRequest request)
      Build a cookie map from the request.
      Parameters:
      request - the request
      Returns:
      the cookie map