Author: davsclaus
Date: Sat Nov 21 11:43:15 2009
New Revision: 882886
URL: http://svn.apache.org/viewvc?rev=882886&view=rev
Log:
CAMEL-2143: Fixed unit tests
Modified:
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInvalidConfigurationTest.java
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInvalidHttpClientConfigurationTest.java
Modified:
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInvalidConfigurationTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInvalidConfigurationTest.java?rev=882886&r1=882885&r2=882886&view=diff
==============================================================================
---
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInvalidConfigurationTest.java
(original)
+++
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInvalidConfigurationTest.java
Sat Nov 21 11:43:15 2009
@@ -17,6 +17,7 @@
package org.apache.camel.component.http;
import org.apache.camel.Exchange;
+import org.apache.camel.FailedToCreateRouteException;
import org.apache.camel.ResolveEndpointFailedException;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit4.CamelTestSupport;
@@ -26,7 +27,7 @@
import static org.apache.camel.component.http.HttpMethods.POST;
/**
- * Unit test of invalid configuraiton
+ * Unit test of invalid configuration
*/
public class HttpInvalidConfigurationTest extends CamelTestSupport {
@@ -35,8 +36,9 @@
try {
super.setUp();
fail("Should have thrown ResolveEndpointFailedException");
- } catch (ResolveEndpointFailedException e) {
- assertTrue(e.getMessage().endsWith("You have duplicated the
http(s) protocol."));
+ } catch (FailedToCreateRouteException e) {
+ ResolveEndpointFailedException cause =
assertIsInstanceOf(ResolveEndpointFailedException.class, e.getCause());
+ assertTrue(cause.getMessage().endsWith("You have duplicated the
http(s) protocol."));
}
}
Modified:
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInvalidHttpClientConfigurationTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInvalidHttpClientConfigurationTest.java?rev=882886&r1=882885&r2=882886&view=diff
==============================================================================
---
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInvalidHttpClientConfigurationTest.java
(original)
+++
camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpInvalidHttpClientConfigurationTest.java
Sat Nov 21 11:43:15 2009
@@ -17,6 +17,7 @@
package org.apache.camel.component.http;
import org.apache.camel.Exchange;
+import org.apache.camel.FailedToCreateRouteException;
import org.apache.camel.ResolveEndpointFailedException;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit4.CamelTestSupport;
@@ -26,7 +27,7 @@
import static org.apache.camel.component.http.HttpMethods.POST;
/**
- * Unit test of invalid configuraiton
+ * Unit test of invalid configuration
*/
public class HttpInvalidHttpClientConfigurationTest extends CamelTestSupport {
@@ -35,8 +36,9 @@
try {
super.setUp();
fail("Should have thrown ResolveEndpointFailedException");
- } catch (ResolveEndpointFailedException e) {
- assertTrue(e.getMessage().endsWith("Unknown
parameters=[{xxx=true}]"));
+ } catch (FailedToCreateRouteException e) {
+ ResolveEndpointFailedException cause =
assertIsInstanceOf(ResolveEndpointFailedException.class, e.getCause());
+ assertTrue(cause.getMessage().endsWith("Unknown
parameters=[{xxx=true}]"));
}
}