cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5795] Adding a system test
Date Thu, 14 Aug 2014 11:31:17 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes e18a3b909 -> 70987ce60


[CXF-5795] Adding a system test


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

Branch: refs/heads/3.0.x-fixes
Commit: 70987ce60f1910c9783c610722358bf854ec540b
Parents: e18a3b9
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Aug 14 12:28:27 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Aug 14 12:30:52 2014 +0100

----------------------------------------------------------------------
 .../test/java/org/apache/cxf/systest/jaxrs/BookStore.java   | 8 ++++++++
 .../apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java | 9 +++++++++
 2 files changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/70987ce6/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
index e0c5f5e..23f2518 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
@@ -1371,6 +1371,14 @@ public class BookStore {
     public Response echoBookNameAndHeader3(String name) {
         return echoBookNameAndHeader(httpHeaders.getRequestHeader("customheader").get(0),
name);
     }
+    
+    @POST
+    @Path("/booksecho202")
+    @Consumes("text/plain")
+    @Produces("text/plain")
+    public Response echoBookName202(String name) {
+        return Response.accepted(name).build();
+    }
         
     
     @GET

http://git-wip-us.apache.org/repos/asf/cxf/blob/70987ce6/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
index c2f355c..8b5a3cb 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
@@ -1608,6 +1608,15 @@ public class JAXRSClientServerBookTest extends AbstractBusClientServerTestBase
{
         assertEquals("book", name);
         assertEquals("custom", wc.getResponse().getHeaderString("CustomHeader"));
     }
+    @Test
+    public void testEchoBookName202() throws Exception {
+        WebClient wc = WebClient.create("http://localhost:" + PORT + "/bookstore/booksecho202");
+        WebClient.getConfig(wc).getRequestContext().put(Message.PROCESS_ONEWAY_RESPONSE,
true);
+        wc.type("text/plain").accept("text/plain");
+        Response r = wc.post("book");
+        assertEquals(202, r.getStatus());
+        assertEquals("book", r.readEntity(String.class));
+    }
     
     @Test
     public void testGetBookSimple() throws Exception {


Mime
View raw message