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:22:18 GMT
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 <sberyozkin@gmail.com>
Authored: Tue May 17 12:22:02 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@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


Mime
View raw message