You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/07/28 13:51:52 UTC

svn commit: r798495 - /camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java

Author: ningjiang
Date: Tue Jul 28 11:51:52 2009
New Revision: 798495

URL: http://svn.apache.org/viewvc?rev=798495&view=rev
Log:
Updated the CxfRawMessageRouterTest with latest CXF 2.2.x

Modified:
    camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java

Modified: camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java?rev=798495&r1=798494&r2=798495&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java (original)
+++ camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java Tue Jul 28 11:51:52 2009
@@ -43,7 +43,7 @@
         Map context = (Map)result.assertExchangeReceived(0).getIn().getHeaders().get("ResponseContext"); 
         assertNotNull("Expect to get the protocal header ", context.get("org.apache.cxf.message.Message.PROTOCOL_HEADERS"));
         Map protocalHeaders = (Map) context.get("org.apache.cxf.message.Message.PROTOCOL_HEADERS");
-        assertEquals("Should get the content type", protocalHeaders.get("content-type").toString(), "[text/xml; charset=utf-8]");
+        assertTrue("Should get the content type", protocalHeaders.get("content-type").toString().startsWith("[text/xml; charset="));
         assertEquals("Should get the response code ", context.get("org.apache.cxf.message.Message.RESPONSE_CODE"), 200);
     }
     
@@ -58,7 +58,7 @@
 
         });        
         assertNotNull("We should get the content type here", exchange.getOut().getHeader("content-type"));
-        assertEquals("Get wrong content type", "text/xml; charset=utf-8", exchange.getOut().getHeader("content-type"));
+        assertTrue("Get wrong content type", ((String)exchange.getOut().getHeader("content-type")).startsWith("text/xml; charset="));
         String response = exchange.getOut().getBody(String.class);        
         assertNotNull("Response should not be null", response);
         assertTrue("We should get right return result", response.indexOf("echo hello world") > 0);