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:24:27 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes ce387defc -> 5d6d54eab


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

Branch: refs/heads/3.0.x-fixes
Commit: 5d6d54eab45a9bf9a080e4ff975352484c76fcb2
Parents: ce387de
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:24:11 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/5d6d54ea/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/5d6d54ea/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 31b0de5..6ddf380 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