cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Updating JAXRS20ClientServerBook test
Date Fri, 15 Jul 2016 07:20:04 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 0c5d2b9fc -> f83200649


Updating JAXRS20ClientServerBook test


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

Branch: refs/heads/3.1.x-fixes
Commit: f83200649af6a69f33a613517594ce64a671a0a6
Parents: 0c5d2b9
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Jul 15 10:09:28 2016 +0300
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Jul 15 10:18:06 2016 +0300

----------------------------------------------------------------------
 .../src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java | 4 ++++
 .../apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f8320064/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 e6ae99e..c3c9683 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
@@ -869,6 +869,10 @@ public class BookStore {
         if (headerSimple != null) {
             builder.header("Simple", headerSimple);
         }
+        String aHeaderValue = httpHeaders.getHeaderString("a");
+        if (aHeaderValue != null) {
+            builder.header("a", aHeaderValue);
+        }
         return builder;
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/f8320064/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
index 2d5773b..2deddfa 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
@@ -38,6 +38,7 @@ import javax.ws.rs.client.ClientRequestFilter;
 import javax.ws.rs.client.ClientResponseContext;
 import javax.ws.rs.client.ClientResponseFilter;
 import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.Invocation;
 import javax.ws.rs.client.InvocationCallback;
 import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.Feature;
@@ -151,8 +152,12 @@ public class JAXRS20ClientServerBookTest extends AbstractBusClientServerTestBase
         Client client = ClientBuilder.newClient();
         client.register((Object)ClientFilterClientAndConfigCheck.class);
         client.property("clientproperty", "somevalue");
-        Book book = client.target(address).request("application/xml").get(Book.class);
+        Invocation.Builder builder = client.target(address).request("application/xml");
+        builder.header("a", "b");
+        Response r = builder.get();
+        Book book = r.readEntity(Book.class);
         assertEquals(124L, book.getId());
+        assertEquals("b", r.getHeaderString("a"));
     }
     
     @Test


Mime
View raw message