> -----Original Message----- > From: Mike Tedesco [mailto:[EMAIL PROTECTED] > Sent: Monday, June 07, 2004 8:07 AM > To: [EMAIL PROTECTED] > Subject: How to set-up setting FormFile Data from a Test Case > > > I'd like to create a test case that sets a struts upload FormFile > with data read from a file, so that it can be read by my > UploadAction without sending it through HTTP.
You're not really asking in quite the right place, since FormFile is a Struts interface, and not from Commons FileUpload. That said, in the Struts code base, you will find two implementations of FormFile. The one that Struts currently uses is CommonsFormFile, which is an inner class of CommonsMultipartRequestHandler. There is an obsolete, but not yet removed, implementation in DiskFile. Either of those should give you a good idea of how to do what you want. Ultimately, as long as you implement the FormFile interface one way or another, you should be good to go. -- Martin Cooper > > Can someone explain how to do this. > > -- Thanks, > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
