Repository: cxf Updated Branches: refs/heads/master a4e25aad7 -> 1156c4efe
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/1156c4ef Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1156c4ef Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1156c4ef Branch: refs/heads/master Commit: 1156c4efe28c357591613b2555f6b50cac890a82 Parents: a4e25aa Author: Sergey Beryozkin <[email protected]> Authored: Tue Oct 13 16:14:43 2015 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Tue Oct 13 16:14:43 2015 +0100 ---------------------------------------------------------------------- .../cxf/systest/jaxrs/JAXRSAsyncClientTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/1156c4ef/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 e10e487..8ee9c9c 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; @@ -102,6 +103,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);
