I'm currently using StrutsTestCase and jUnit to component test my Actions
within the Struts context using a Mockito mock as my Model.

 

This is working fine. I can call request.setParamater ("paramName",
"paramValue") from the test class and, when executed, Struts will call the
corresponding setParamName ("paramValue") on my Action.

 

However I now wish to test "file upload" Actions. In normal use the
FileUploadInterceptor will call setUploadedFile (java.io.File file) on the
action. However I can't see any methods on the StrutsTestCase request object
which will prepare the request with an uploaded file. Has anyone got this to
work?

 

Steve Higham

 

Reply via email to