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:09:47 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 79ce1f4ca -> e40e06391


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

Branch: refs/heads/master
Commit: e40e06391def7c8060ccc386f0d9433ffb137742
Parents: 79ce1f4
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:09:28 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/e40e0639/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/e40e0639/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