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 a JAX-RS test with MBW setting one more header
Date Tue, 17 May 2016 11:23:04 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes be6842e34 -> e2fb04839


Updating a JAX-RS test with MBW setting one more header


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

Branch: refs/heads/3.1.x-fixes
Commit: e2fb0483991bc3ae389b2b72fa8d96cfb98eb2af
Parents: be6842e
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue May 17 12:22:02 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue May 17 12:22:49 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/systest/jaxrs/ContentTypeModifyingMBW.java | 1 +
 .../org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java    | 2 ++
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/e2fb0483/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ContentTypeModifyingMBW.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ContentTypeModifyingMBW.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ContentTypeModifyingMBW.java
index c9d2624..0fd4f82 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ContentTypeModifyingMBW.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ContentTypeModifyingMBW.java
@@ -45,6 +45,7 @@ public class ContentTypeModifyingMBW implements MessageBodyWriter<String>
{
                         MultivaluedMap<String, Object> headers, OutputStream os) throws
IOException,
         WebApplicationException {
         headers.putSingle("Content-Type", mt.toString() + ";charset=us-ascii");
+        headers.putSingle("CustomHeader", "CustomValue");
         os.write(str.getBytes());
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/e2fb0483/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 2e7bdd6..648c1ca 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
@@ -351,6 +351,8 @@ public class JAXRSClientServerBookTest extends AbstractBusClientServerTestBase
{
         String name = r.readEntity(String.class);
         assertEquals("Good book", name);
         assertEquals("text/custom;charset=us-ascii", r.getMediaType().toString());
+        assertEquals("CustomValue", r.getHeaderString("CustomHeader"));
+        
     }    
     
     @Test


Mime
View raw message