camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r802492 - /camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/BruceHandlingBeanExceptionTest.java
Date Sun, 09 Aug 2009 06:14:47 GMT
Author: davsclaus
Date: Sun Aug  9 06:14:47 2009
New Revision: 802492

URL: http://svn.apache.org/viewvc?rev=802492&view=rev
Log:
Polished unit test as its now possible in camel 2.0

Modified:
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/BruceHandlingBeanExceptionTest.java

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/BruceHandlingBeanExceptionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/BruceHandlingBeanExceptionTest.java?rev=802492&r1=802491&r2=802492&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/BruceHandlingBeanExceptionTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/BruceHandlingBeanExceptionTest.java
Sun Aug  9 06:14:47 2009
@@ -22,7 +22,6 @@
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Ignore;
 import org.junit.Test;
 import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
 
@@ -43,12 +42,11 @@
         assertEquals("This is a fault message", out);
     }
 
-    @Ignore
-    @Test    
-    public void xxxtestSendError() throws Exception {
-        // TODO: See CAMEL-585
+    @Test
+    public void testSendError() throws Exception {
         Object out = template.requestBody("activemq:queue:error", "Hello World");
-        assertEquals("Damm", out);
+        IllegalArgumentException e = assertIsInstanceOf(IllegalArgumentException.class, out);
+        assertEquals("Forced exception by unit test", e.getMessage());
     }
 
     protected CamelContext createCamelContext() throws Exception {
@@ -69,7 +67,7 @@
 
                 from("activemq:queue:fault").setFaultBody(constant("This is a fault message"));
 
-                from("activemq:queue:error").bean(MyExceptionBean.class);
+                from("activemq:queue:error?transferException=true").bean(MyExceptionBean.class);
             }
         };
     }



Mime
View raw message