camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject git commit: Added an unit test to verify the xslt processing with dom object
Date Thu, 22 May 2014 08:36:41 GMT
Repository: camel
Updated Branches:
  refs/heads/master 5ab32ac3f -> 01b3cc097


Added an unit test to verify the xslt processing with dom object


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

Branch: refs/heads/master
Commit: 01b3cc097cdb1a665c815cd5d93ce459eab57fcd
Parents: 5ab32ac
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Thu May 22 16:36:04 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Thu May 22 16:36:04 2014 +0800

----------------------------------------------------------------------
 .../java/org/apache/camel/component/xslt/XsltRouteTest.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/01b3cc09/camel-core/src/test/java/org/apache/camel/component/xslt/XsltRouteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltRouteTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltRouteTest.java
index 094d5f9d..62d2be8 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltRouteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltRouteTest.java
@@ -18,10 +18,13 @@ package org.apache.camel.component.xslt;
 
 import java.util.List;
 
+import org.w3c.dom.Document;
+
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.converter.jaxp.XmlConverter;
 import org.apache.camel.impl.JndiRegistry;
 
 public class XsltRouteTest extends ContextTestSupport {
@@ -34,6 +37,12 @@ public class XsltRouteTest extends ContextTestSupport {
         sendMessageAndHaveItTransformed("<mail><subject>Hey</subject><body>Hello
world!</body></mail>".getBytes());
     }
     
+    public void testSendDomMessage() throws Exception {
+        XmlConverter  converter = new XmlConverter();
+        Document body = converter.toDOMDocument("<mail><subject>Hey</subject><body>Hello
world!</body></mail>");
+        sendMessageAndHaveItTransformed(body);
+    }
+    
     private void sendMessageAndHaveItTransformed(Object body) throws Exception {
         MockEndpoint endpoint = getMockEndpoint("mock:result");
         endpoint.expectedMessageCount(1);


Mime
View raw message