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/97aceb7e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/97aceb7e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/97aceb7e

Branch: refs/heads/2.7.x-fixes
Commit: 97aceb7ec723b8a019f32624b3ff1cd4f555fd89
Parents: e707fb3
Author: Sergey Beryozkin <[email protected]>
Authored: Tue Oct 13 16:14:43 2015 +0100
Committer: Sergey Beryozkin <[email protected]>
Committed: Tue Oct 13 17:06:12 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/97aceb7e/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 9e91e52..9355b0e 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
@@ -85,6 +85,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);

Reply via email to