Re: testing file uploads

2008-03-31 Thread Adam Hardy
ent: Monday, March 31, 2008 12:04 PM Subject: testing file uploads 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. MultiPartRequestWrappe

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
pServletRequest(), MockHttpServletResponse(), MockServletContext() from org.apache.struts2.ServletActionContextTest.java ? - Original Message - From: "Adam Hardy" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, March 31, 2008 12:04 PM Subject:

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

testing file uploads

2008-03-31 Thread Adam Hardy
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. MultiPartRequestWrapper multiWrapper = (MultiPartRequestWrapper) ServletActionContext.getRequest()