Class RenderPageAction

  • All Implemented Interfaces:
    Action

    public class RenderPageAction
    extends Object
    implements Action
    Checks the rendering of a page of a given resource.
    Author:
    Roland Gruber
    • Constructor Detail

      • RenderPageAction

        public RenderPageAction​(BindingContext context,
                                int statusCode,
                                String textPresent,
                                String textNotPresent)
        Constructor
        Parameters:
        context - binding context
        statusCode - expected status code
        textPresent - text that must be present
        textNotPresent - text that must not be present
    • Method Detail

      • doAction

        public String doAction​(org.apache.sling.api.resource.Resource resource)
                        throws org.apache.sling.api.resource.PersistenceException,
                               de.valtech.aecu.api.service.AecuException
        Description copied from interface: Action
        Runs an action.
        Specified by:
        doAction in interface Action
        Parameters:
        resource - resource to run action on
        Returns:
        output message
        Throws:
        org.apache.sling.api.resource.PersistenceException - error saving to JCR
        de.valtech.aecu.api.service.AecuException - other errors
      • createResponse

        protected MockHttpServletResponse createResponse()
        Creates the mocked response. This is needed to get the status code.
        Returns:
        response