cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1502284 - in /cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs: JAXRSMultipartTest.java MultipartStore.java
Date Thu, 11 Jul 2013 16:44:08 GMT
Author: sergeyb
Date: Thu Jul 11 16:44:08 2013
New Revision: 1502284

URL: http://svn.apache.org/r1502284
Log:
Adding a simple test where multiparts are looked up explicitly

Modified:
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java?rev=1502284&r1=1502283&r2=1502284&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSMultipartTest.java
Thu Jul 11 16:44:08 2013
@@ -170,6 +170,12 @@ public class JAXRSMultipartTest extends 
     }
     
     @Test
+    public void testBookJSONFormTwoFiles2() throws Exception {
+        String address = "http://localhost:" + PORT + "/bookstore/books/filesform2";
+        doAddFormBook(address, "attachmentFormJsonFiles", 200);               
+    }
+    
+    @Test
     public void testBookJSONFormTwoFilesNotRecursive() throws Exception {
         String address = "http://localhost:" + PORT + "/bookstore/books/filesform";
         doAddFormBook(address, "attachmentFormJsonFiles2", 200);               

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java?rev=1502284&r1=1502283&r2=1502284&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/MultipartStore.java
Thu Jul 11 16:44:08 2013
@@ -480,6 +480,16 @@ public class MultipartStore {
     }
     
     @POST
+    @Path("/books/filesform2")
+    @Produces("text/xml")
+    @Consumes("multipart/form-data")
+    public Response addBookFilesFormNoOwnerParam(@Multipart("files") List<Book> books)

+        throws Exception {
+        Attachment attOwner = AttachmentUtils.getFirstMatchingPart(context, "owner");
+        return addBookFilesForm(attOwner.getObject(String.class), books);
+    }
+    
+    @POST
     @Path("/books/filesform/singlefile")
     @Produces("text/xml")
     @Consumes("multipart/form-data")



Mime
View raw message