This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 39b5893  Fixed test
39b5893 is described below

commit 39b5893f8203ee022a96a60e6592e996de5c4805
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Feb 6 07:37:21 2019 +0100

    Fixed test
---
 .../camel/component/xslt/SaxonXsltMessageTerminateTest.java      | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-saxon/src/test/java/org/apache/camel/component/xslt/SaxonXsltMessageTerminateTest.java
 
b/components/camel-saxon/src/test/java/org/apache/camel/component/xslt/SaxonXsltMessageTerminateTest.java
index 0ba6ccf..07367ca 100644
--- 
a/components/camel-saxon/src/test/java/org/apache/camel/component/xslt/SaxonXsltMessageTerminateTest.java
+++ 
b/components/camel-saxon/src/test/java/org/apache/camel/component/xslt/SaxonXsltMessageTerminateTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.xslt;
 
+import net.sf.saxon.expr.instruct.TerminationException;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.junit4.CamelTestSupport;
@@ -28,6 +29,8 @@ public class SaxonXsltMessageTerminateTest extends 
CamelTestSupport {
         getMockEndpoint("mock:result").expectedMessageCount(0);
         getMockEndpoint("mock:dead").expectedMessageCount(1);
 
+        context.getRouteController().startRoute("foo");
+
         assertMockEndpointsSatisfied();
 
         Exchange out = 
getMockEndpoint("mock:dead").getReceivedExchanges().get(0);
@@ -37,9 +40,9 @@ public class SaxonXsltMessageTerminateTest extends 
CamelTestSupport {
         assertNotNull(cause);
 
         // we have the xsl termination message as a error property on the 
exchange as we set terminate=true
-        Exception error = out.getProperty(Exchange.XSLT_ERROR, 
Exception.class);
+        Exception error = out.getProperty(Exchange.XSLT_FATAL_ERROR, 
Exception.class);
         assertNotNull(error);
-        assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>Error: DOB is 
an empty string!", error.getMessage());
+        assertIsInstanceOf(TerminationException.class, error);
     }
 
     @Override
@@ -49,7 +52,7 @@ public class SaxonXsltMessageTerminateTest extends 
CamelTestSupport {
             public void configure() throws Exception {
                 errorHandler(deadLetterChannel("mock:dead"));
 
-                from("file:src/test/data/?fileName=terminate.xml&noop=true")
+                
from("file:src/test/data/?fileName=terminate.xml&noop=true").routeId("foo").noAutoStartup()
                     
.to("xslt:org/apache/camel/component/xslt/terminate.xsl?saxon=true")
                     .to("log:foo")
                     .to("mock:result");

Reply via email to