camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r882895 - /camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaEncodingTest.java
Date Sat, 21 Nov 2009 13:14:57 GMT
Author: davsclaus
Date: Sat Nov 21 13:14:56 2009
New Revision: 882895

URL: http://svn.apache.org/viewvc?rev=882895&view=rev
Log:
CAMEL-2143: Fixed unit tests

Modified:
    camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaEncodingTest.java

Modified: camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaEncodingTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaEncodingTest.java?rev=882895&r1=882894&r2=882895&view=diff
==============================================================================
--- camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaEncodingTest.java
(original)
+++ camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaEncodingTest.java
Sat Nov 21 13:14:56 2009
@@ -19,6 +19,7 @@
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
+import org.apache.camel.FailedToCreateRouteException;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.ResolveEndpointFailedException;
@@ -179,9 +180,10 @@
                 }
             });
             fail("Should have thrown a ResolveEndpointFailedException due invalid encoding
parameter");
-        } catch (ResolveEndpointFailedException e) {
-            assertTrue(e.getCause() instanceof IllegalArgumentException);
-            assertEquals("The encoding: XXX is not supported", e.getCause().getMessage());
+        } catch (FailedToCreateRouteException e) {
+            ResolveEndpointFailedException cause = assertIsInstanceOf(ResolveEndpointFailedException.class,
e.getCause());
+            assertTrue(cause.getCause() instanceof IllegalArgumentException);
+            assertEquals("The encoding: XXX is not supported", cause.getCause().getMessage());
         }
     }
 



Mime
View raw message