camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1295387 - in /camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf: CxfProducerContextTest.java CxfProducerOperationTest.java CxfProducerTest.java
Date Thu, 01 Mar 2012 02:45:35 GMT
Author: ningjiang
Date: Thu Mar  1 02:45:35 2012
New Revision: 1295387

URL: http://svn.apache.org/viewvc?rev=1295387&view=rev
Log:
Add a message header test on the CxfProducer

Modified:
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerOperationTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java?rev=1295387&r1=1295386&r2=1295387&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
(original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
Thu Mar  1 02:45:35 2012
@@ -75,6 +75,7 @@ public class CxfProducerContextTest exte
                 exchange.getIn().setHeader(Client.REQUEST_CONTEXT , requestContext);
                 exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, ECHO_OPERATION);
                 exchange.getIn().setHeader(Exchange.FILE_NAME, "testFile");
+                exchange.getIn().setHeader("requestObject", new DefaultCxfBinding());
                 exchange.getProperties().put(TEST_KEY, TEST_VALUE);
             }
         });

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerOperationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerOperationTest.java?rev=1295387&r1=1295386&r2=1295387&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerOperationTest.java
(original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerOperationTest.java
Thu Mar  1 02:45:35 2012
@@ -55,6 +55,7 @@ public class CxfProducerOperationTest ex
                 params.add(TEST_MESSAGE);
                 exchange.getIn().setBody(params);
                 exchange.getIn().setHeader(Exchange.FILE_NAME, "testFile");
+                exchange.getIn().setHeader("requestObject", new DefaultCxfBinding());
             }
         });
         return exchange;

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java?rev=1295387&r1=1295386&r2=1295387&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
(original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
Thu Mar  1 02:45:35 2012
@@ -122,6 +122,10 @@ public class CxfProducerTest extends Ass
         // check the other camel header copying
         String fileName = out.getHeader(Exchange.FILE_NAME, String.class);
         assertEquals("Should get the file name from out message header", "testFile", fileName);
+        
+        // check if the header object is turned into String
+        Object requestObject = out.getHeader("requestObject");
+        assertTrue("We should get the right requestObject.", requestObject instanceof DefaultCxfBinding);
     }
 
     @Test
@@ -184,6 +188,7 @@ public class CxfProducerTest extends Ass
                 exchange.getIn().setBody(params);
                 exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, ECHO_OPERATION);
                 exchange.getIn().setHeader(Exchange.FILE_NAME, "testFile");
+                exchange.getIn().setHeader("requestObject", new DefaultCxfBinding());
             }
         });
         return exchange;



Mime
View raw message