You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/11/20 07:51:59 UTC

[3/3] camel git commit: Fixed test

Fixed test


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

Branch: refs/heads/camel-2.16.x
Commit: fd534e777b1724632be86ca7246bb76fa2574efd
Parents: 5fcb497
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Nov 20 07:51:04 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Nov 20 07:51:29 2015 +0100

----------------------------------------------------------------------
 .../util/toolbox/XsltAggregationStrategyTest.java     | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fd534e77/components/camel-saxon/src/test/java/org/apache/camel/util/toolbox/XsltAggregationStrategyTest.java
----------------------------------------------------------------------
diff --git a/components/camel-saxon/src/test/java/org/apache/camel/util/toolbox/XsltAggregationStrategyTest.java b/components/camel-saxon/src/test/java/org/apache/camel/util/toolbox/XsltAggregationStrategyTest.java
index 7ad2ab6..d0e3c5e 100644
--- a/components/camel-saxon/src/test/java/org/apache/camel/util/toolbox/XsltAggregationStrategyTest.java
+++ b/components/camel-saxon/src/test/java/org/apache/camel/util/toolbox/XsltAggregationStrategyTest.java
@@ -24,26 +24,30 @@ import org.junit.Test;
 /**
  * Unit test for the {@link XsltAggregationStrategy}.
  * <p>
- * Need to use Saxon to get a predictable result: we cannot rely on the JDK's XSLT processor as it can vary across
+ * Need to use Saxon to get a predictable result: We cannot rely on the JDK's XSLT processor as it can vary across
  * platforms and JDK versions. Also, Xalan does not handle node-set properties well.
  */
 public class XsltAggregationStrategyTest extends CamelTestSupport {
 
     @Test
     public void testXsltAggregationDefaultProperty() throws Exception {
-        context.startRoute("route1");
         MockEndpoint mock = getMockEndpoint("mock:transformed");
         mock.expectedMessageCount(1);
         mock.expectedBodiesReceived("<?xml version=\"1.0\" encoding=\"UTF-8\"?><item>ABC</item>");
+
+        context.startRoute("route1");
+
         assertMockEndpointsSatisfied();
     }
 
     @Test
     public void testXsltAggregationUserProperty() throws Exception {
-        context.startRoute("route2");
         MockEndpoint mock = getMockEndpoint("mock:transformed");
         mock.expectedMessageCount(1);
         mock.expectedBodiesReceived("<?xml version=\"1.0\" encoding=\"UTF-8\"?><item>ABC</item>");
+
+        context.startRoute("route2");
+
         assertMockEndpointsSatisfied();
     }
 
@@ -51,7 +55,7 @@ public class XsltAggregationStrategyTest extends CamelTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:src/test/resources/org/apache/camel/util/toolbox?noop=true&antInclude=*.xml")
+                from("file:src/test/resources/org/apache/camel/util/toolbox?noop=true&sortBy=file:name&antInclude=*.xml")
                         .routeId("route1").noAutoStartup()
                         .aggregate(new XsltAggregationStrategy("org/apache/camel/util/toolbox/aggregate.xsl")
                                 .withSaxon())
@@ -60,7 +64,7 @@ public class XsltAggregationStrategyTest extends CamelTestSupport {
                         .log("after aggregate body: ${body}")
                         .to("mock:transformed");
 
-                from("file:src/test/resources/org/apache/camel/util/toolbox?noop=true&antInclude=*.xml")
+                from("file:src/test/resources/org/apache/camel/util/toolbox?noop=true&sortBy=file:name&antInclude=*.xml")
                         .routeId("route2").noAutoStartup()
                         .aggregate(new XsltAggregationStrategy("org/apache/camel/util/toolbox/aggregate-user-property.xsl")
                                 .withSaxon().withPropertyName("user-property"))