[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2982) Give MultipartRequest constructor to support unit testing

Tom N (JIRA) jira-events at lists.jboss.org
Wed May 14 15:21:26 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBSEAM-2982?page=comments#action_12412790 ] 
            
Tom N commented on JBSEAM-2982:
-------------------------------

Right.  I can mock a HttpServletRequest now.  The problem is when my servlet uses a MultipartRequest, and I need to mock the getFile* methods that are part of MultipartRequest.  See Spring's MultipartHttpServletRequest (Note that it is an interface):
http://static.springframework.org/spring/docs/2.0.2/api/index.html?org/springframework/web/multipart/MultipartHttpServletRequest.html  

> 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

        



More information about the seam-issues mailing list