Fixed test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b7bede86 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b7bede86 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b7bede86 Branch: refs/heads/master Commit: b7bede86a4e1b962caaa7c3ab7fd4b479005e4d5 Parents: 26368f7 Author: Claus Ibsen <davscl...@apache.org> Authored: Fri Nov 20 07:51:04 2015 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Fri Nov 20 07:51:04 2015 +0100 ---------------------------------------------------------------------- .../util/toolbox/XsltAggregationStrategyTest.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/b7bede86/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"))