[
http://jira.jboss.com/jira/browse/JBSEAM-2982?page=comments#action_12412631 ]
Shane Bryzak commented on JBSEAM-2982:
--------------------------------------
It's technically not the best way, because there's still a multitude of other
methods that call getParam() thereby triggering the request parsing, and you can't
override getParam() because it's private. However, if your tests can make do with the
overridden methods that you've already mentioned then I guess it will be sufficient,
at least for your own requirements. If so, feel free to close this issue, otherwise let
me know differently and I'll look at making MultipartRequest more mock-friendly.
Give MultipartRequest constructor to support unit testing
---------------------------------------------------------
Key: JBSEAM-2982
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2982
Project: Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.1.0.A1, 2.0.1.GA
Environment: N/A
Reporter: Tom N
Assigned To: Shane Bryzak
Fix For: 2.1.0.BETA1
MultipartRequest cannot easily be mocked for unit testing. This could be solved by (1)
making that type into an interface, or (2) changing the constructor so that the wrapped
HttpServletRequest body is not parsed when the constructor is invoked. See the forum link
for more details.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira