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

PortletActionContext does not provide setters for PortletRequest, PortletResponse, PortletContext

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.11.2, 2.1.2
    • Fix Version/s: 2.1.3
    • Labels:
      None
    • Environment:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: