views:

235

answers:

0

I'm working with Restlet 1.1.8 and am trying to write a Resource that parses a multipart form; it needs to allow upload of an Excel spreadsheet.

I have the Resource working, when I run it from my web app it's doing The Right Things(tm) so far, but I want to write an acceptance test that POSTs via Java code so I can throw lots of test cases at it.

How can I write a JUnit test that does this? My attempts are not working; I am trying to assemble a multipart form and put it in an InputRepresentation, but the server code does not take it apart correctly; it doesn't see the boundaries.