camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [1/2] git commit: Added an unit test based on the mailing list
Date Wed, 13 Nov 2013 07:55:23 GMT
Updated Branches:
  refs/heads/master 0d95b9f36 -> f043ad9cb


Added an unit test based on the mailing list


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cbf1a024
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cbf1a024
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cbf1a024

Branch: refs/heads/master
Commit: cbf1a0244f1cfbedbf4e9be1b52414f4218539d5
Parents: 0d95b9f
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Wed Nov 13 11:54:50 2013 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Wed Nov 13 14:30:48 2013 +0800

----------------------------------------------------------------------
 .../test/java/org/apache/camel/jaxb/CamelJaxbTest.java   | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/cbf1a024/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/CamelJaxbTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/CamelJaxbTest.java
b/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/CamelJaxbTest.java
index 010f80e..ab1daf5 100644
--- a/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/CamelJaxbTest.java
+++ b/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/CamelJaxbTest.java
@@ -129,6 +129,12 @@ public class CamelJaxbTest extends CamelTestSupport {
         template.sendBody("direct:getJAXBElement", xml);        
         resultEndpoint.assertIsSatisfied();
         assertTrue("We should get the JAXBElement here", resultEndpoint.getExchanges().get(0).getIn().getBody()
instanceof JAXBElement);
+        
+        resultEndpoint.reset();
+        resultEndpoint.expectedMessageCount(1);
+        resultEndpoint.expectedBodiesReceived(expected);
+        template.sendBody("direct:unmarshall", xml);        
+        resultEndpoint.assertIsSatisfied();
     }
 
     @Override
@@ -175,6 +181,11 @@ public class CamelJaxbTest extends CamelTestSupport {
                 from("direct:marshalCustomWriterAndFiltering")
                         .marshal(customWriterAndFilterFormat)
                         .to("mock:result");
+                
+                from("direct:unmarshall")
+                    .unmarshal()
+                    .jaxb(PersonType.class.getPackage().getName())
+                    .to("mock:result");
 
             }
         };


Mime
View raw message