PortletActionContext does not provide setters for PortletRequest,
PortletResponse, PortletContext
-------------------------------------------------------------------------------------------------
Key: WW-2800
URL: https://issues.apache.org/struts/browse/WW-2800
Project: Struts 2
Issue Type: Improvement
Components: Plugin - Portlet, Unit Tests
Affects Versions: 2.1.2, 2.0.11.2
Environment: Linux, Pluto 1.1.6, Tomcat 6.x
Reporter: Torsten Krah
Priority: Minor
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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.