Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2800

PortletActionContext does not provide setters for PortletRequest, PortletResponse, PortletContext

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.11.2, 2.1.2
    • 2.1.3
    • None
    • Linux, Pluto 1.1.6, Tomcat 6.x

    Description

      Hi.
      The ServletActionContect class does provide setters like this:

      ServletActionContext.setRequest(request);
      ServletActionContext.setResponse(response);
      ServletActionContext.setServletContext(servletContext);

      So i am able to use MockObjects (Servlet ones) and write Unit Tests to test my Actions.

      Now i want to use Portlets (it should be possible to do the test like above and it should work, but using "portlet" stuff is more clean).

      But the PortletActionContext class does not provide any setter to plugin mocks for PortletRequest, PortletResponse or the PortletContext (analog to the ones in a servlet environment).
      It would be nice (to make unit tests with portlet mock objects working - like provided with spring-test) to implement these setters.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tkrah Torsten Krah
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: