cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Adding JAXRSAsyncClientTest with InputStream
Date Tue, 13 Oct 2015 15:15:51 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 306cf6ab3 -> 9de41236f


Adding JAXRSAsyncClientTest with InputStream


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/9de41236
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9de41236
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9de41236

Branch: refs/heads/3.0.x-fixes
Commit: 9de41236f41dee6bde551bd9ce4fb22aa5bd7066
Parents: 306cf6a
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Oct 13 16:14:43 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Oct 13 16:15:32 2015 +0100

----------------------------------------------------------------------
 .../cxf/systest/jaxrs/JAXRSAsyncClientTest.java      | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/9de41236/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
index 084322d..d400bce 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSAsyncClientTest.java
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.systest.jaxrs;
 
+import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -103,6 +104,20 @@ public class JAXRSAsyncClientTest extends AbstractBusClientServerTestBase
{
     }
     
     @Test
+    public void testPatchBookInputStream() throws Exception {
+        String address = "http://localhost:" + PORT + "/bookstore/patch";
+        WebClient wc = WebClient.create(address);
+        wc.type("application/xml");
+        WebClient.getConfig(wc).getRequestContext().put("use.async.http.conduit", true);
+        Book book = wc.invoke("PATCH", 
+                              new ByteArrayInputStream(
+                                  "<Book><name>Patch</name><id>123</id></Book>".getBytes()),

+                              Book.class);
+        assertEquals("Patch", book.getName());
+        wc.close();
+    }
+    
+    @Test
     public void testDeleteWithBody() throws Exception {
         String address = "http://localhost:" + PORT + "/bookstore/deletebody";
         WebClient wc = WebClient.create(address);


Mime
View raw message