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:42:58 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes b125a0042 -> ea28479d6


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

Branch: refs/heads/2.7.x-fixes
Commit: ea28479d6576b298debd0234ca17129ab7fc7d0a
Parents: b125a00
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:42:36 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/ea28479d/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 bafb0d2..14ae361 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
@@ -1351,6 +1351,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/ea28479d/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 504f9a9..c5f8e7e 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
@@ -1586,6 +1586,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