camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r946624 - /camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyContentTypeTest.java
Date Thu, 20 May 2010 13:25:53 GMT
Author: ningjiang
Date: Thu May 20 13:25:53 2010
New Revision: 946624

URL: http://svn.apache.org/viewvc?rev=946624&view=rev
Log:
Updated the unit test according to the mailing list

Modified:
    camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyContentTypeTest.java

Modified: camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyContentTypeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyContentTypeTest.java?rev=946624&r1=946623&r2=946624&view=diff
==============================================================================
--- camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyContentTypeTest.java
(original)
+++ camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyContentTypeTest.java
Thu May 20 13:25:53 2010
@@ -34,7 +34,8 @@ public class JettyContentTypeTest extend
         Endpoint endpoint = context.getEndpoint("http://localhost:9080/myapp/myservice");
         Exchange exchange = endpoint.createExchange();
         exchange.getIn().setBody("<order>123</order>");
-        exchange.getIn().setHeader("user", "Claus");
+        exchange.getIn().setHeader("User", "Claus");
+        exchange.getIn().setHeader("SOAPAction", "test");
         exchange.getIn().setHeader("Content-Type", "text/xml");
         if (usingGZip) {
             exchange.getIn().setHeader("Content-Encoding", "gzip");
@@ -81,9 +82,10 @@ public class JettyContentTypeTest extend
 
     public class MyBookService implements Processor {
         public void process(Exchange exchange) throws Exception {
-            if (exchange.getIn().getHeader("user") != null 
+            if ("Claus".equals(exchange.getIn().getHeader("User", String.class))
                 && exchange.getIn().getBody(String.class).equals("<order>123</order>")
                 && "text/xml".equals(ExchangeHelper.getContentType(exchange))) {
+                assertEquals("test", exchange.getIn().getHeader("SOAPAction", String.class));
                 exchange.getOut().setBody("<order>OK</order>");
                 exchange.getOut().setHeader("Content-Type", "text/xml");
             } else {



Mime
View raw message