You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/05/17 11:22:18 UTC

cxf git commit: Updating a JAX-RS test with MBW setting one more header

Repository: cxf
Updated Branches:
  refs/heads/master 1bf3adcbe -> 1f038da1a


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

Branch: refs/heads/master
Commit: 1f038da1a0ccd13cd4682d90c51615ddb6060ab4
Parents: 1bf3adc
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Tue May 17 12:22:02 2016 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Tue May 17 12:22:02 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/1f038da1/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/1f038da1/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