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:28:50 GMT
Repository: cxf
Updated Branches:
  refs/heads/master f8f5bc310 -> 91f89e489


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

Branch: refs/heads/master
Commit: 91f89e489e558edb974e88301949ec8b2b896303
Parents: f8f5bc3
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:28:27 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/91f89e48/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/91f89e48/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 ddb4d6c..bc1bb7c 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
@@ -1621,6 +1621,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