cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [1/4] cxf git commit: Adding JAXRSAsyncClientTest with InputStream
Date Tue, 13 Oct 2015 16:09:39 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 6967c170e -> 349ab460e


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

Branch: refs/heads/2.7.x-fixes
Commit: e707fb369ec08dbfc9f8fda88513811bd9749ce0
Parents: 6967c17
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:16:56 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/e707fb36/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 686d3f7..9e91e52 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;
@@ -70,6 +71,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