Re: testing file uploads

2008-03-31 Thread Adam Hardy
Just remembered struts2 isn't a servlet. I just wanted a quick and easy way of giving my action a real multipart request wrapper to run against. So tomorrow I guess I'll have to check out the MockMultipartRequestWrapper. Thanks Adam Martin Gainty on 31/03/08 20:55, wrote: Have you looked at u

Re: testing file uploads

2008-03-31 Thread Dave Newton
--- Adam Hardy <[EMAIL PROTECTED]> wrote: > I see the multipart http request as a weak point in the servlet spec. Or > the http spec. But I want to test it for my own piece of mind, and when > I have the test finished, I guess I can work out if it's really necessary. You want to test multipart HT

Re: testing file uploads

2008-03-31 Thread Adam Hardy
Dave Newton on 31/03/08 22:00, wrote: --- Adam Hardy <[EMAIL PROTECTED]> wrote: Dave Newton on 31/03/08 18:42, wrote: What, specifically, are you trying to test? The action has to get strings out of the request, work out which file they are from and call the appropriate managers, with the corr

Re: testing file uploads

2008-03-31 Thread Dave Newton
--- Adam Hardy <[EMAIL PROTECTED]> wrote: > Dave Newton on 31/03/08 18:42, wrote: > > What, specifically, are you trying to test? > > The action has to get strings out of the request, work out which file they > are from and call the appropriate managers, with the corresponding string > as a reque

Re: testing file uploads

2008-03-31 Thread Adam Hardy
Didn't see that. I might use it. But I don't actually know quite what the MultipartRequestHandler does, so I'm not sure how to mock it :) I figured the ServletUnit framework would teach me. Martin Gainty on 31/03/08 20:55, wrote: Have you looked at using Mock classes of MockHttpServletRequest()

Re: testing file uploads

2008-03-31 Thread Adam Hardy
Dave Newton on 31/03/08 18:42, wrote: --- Adam Hardy <[EMAIL PROTECTED]> wrote: I need to test an action that is getting uploaded files and piping them straight into Strings. I don't want to save actual files on server, so I'll get the multipart request wrapper directly. What, specifically,

Re: testing file uploads

2008-03-31 Thread Dave Newton
--- Adam Hardy <[EMAIL PROTECTED]> wrote: > I need to test an action that is getting uploaded files and piping them > straight into Strings. I don't want to save actual files on server, so I'll > get the multipart request wrapper directly. What, specifically, are you trying to test? I ask becaus