You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ak...@apache.org on 2011/01/07 19:11:46 UTC
svn commit: r1056433 -
/camel/trunk/camel-core/src/test/java/org/apache/camel/model/StartingRoutesErrorReportedTest.java
Author: akarpe
Date: Fri Jan 7 18:11:46 2011
New Revision: 1056433
URL: http://svn.apache.org/viewvc?rev=1056433&view=rev
Log:
CAMEL-3508 Added unit test for fix for a better exception message when data format not on classpath
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/model/StartingRoutesErrorReportedTest.java
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/model/StartingRoutesErrorReportedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/model/StartingRoutesErrorReportedTest.java?rev=1056433&r1=1056432&r2=1056433&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/model/StartingRoutesErrorReportedTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/model/StartingRoutesErrorReportedTest.java Fri Jan 7 18:11:46 2011
@@ -19,6 +19,8 @@ package org.apache.camel.model;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.FailedToCreateRouteException;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.impl.JndiRegistry;
+import org.apache.camel.spi.DataFormat;
/**
* @version $Revision$
@@ -71,6 +73,23 @@ public class StartingRoutesErrorReported
}
}
+ public void testUnavailableDataFormatOnClasspath() throws Exception {
+ try {
+ context.addRoutes(new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+
+ from("direct:start").routeId("route3")
+ .unmarshal().jaxb()
+ .log("Will never get here");
+ }
+ });
+ context.start();
+ } catch (FailedToCreateRouteException e) {
+ assertTrue(e.getMessage().contains("Ensure that the dataformat is valid and the associated Camel component is present on the classpath"));
+ }
+ }
+
@Override
public boolean isUseRouteBuilder() {
return false;