camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1359265 - in /camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda: SedaRemoveRouteThenAddAgainTest.java SedaRemoveRouteThenAddItAgainTest.java
Date Mon, 09 Jul 2012 16:39:51 GMT
Author: bvahdat
Date: Mon Jul  9 16:39:51 2012
New Revision: 1359265

URL: http://svn.apache.org/viewvc?rev=1359265&view=rev
Log:
CAMEL-5432: Polished the unit-test.

Added:
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddAgainTest.java
      - copied, changed from r1359226, camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddItAgainTest.java
Removed:
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddItAgainTest.java

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddAgainTest.java
(from r1359226, camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddItAgainTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddAgainTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddAgainTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddItAgainTest.java&r1=1359226&r2=1359265&rev=1359265&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddItAgainTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaRemoveRouteThenAddAgainTest.java
Mon Jul  9 16:39:51 2012
@@ -23,7 +23,7 @@ import org.apache.camel.component.mock.M
 /**
  * @version
  */
-public class SedaRemoveRouteThenAddItAgainTest extends ContextTestSupport {
+public class SedaRemoveRouteThenAddAgainTest extends ContextTestSupport {
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
@@ -36,23 +36,28 @@ public class SedaRemoveRouteThenAddItAga
         };
     }
 
-    public void testRemoveRouteAndThenAddItAgain() throws Exception {
+    public void testRemoveRouteAndThenAddAgain() throws Exception {
         MockEndpoint out = getMockEndpoint("mock:out");
         out.expectedMessageCount(1);
+        out.expectedBodiesReceived("before removing the route");
 
-        template.sendBody("seda:in", "Test Message");
+        template.sendBody("seda:in", "before removing the route");
 
         out.assertIsSatisfied();
 
         out.reset();
 
+        // now stop & remove the route
         context.stopRoute("sedaToMock");
         context.removeRoute("sedaToMock");
+
+        // and then add it back again
         context.addRoutes(createRouteBuilder());
 
         out.expectedMessageCount(1);
+        out.expectedBodiesReceived("after removing the route");
 
-        template.sendBody("seda:in", "Test Message");
+        template.sendBody("seda:in", "after removing the route");
 
         out.assertIsSatisfied();
     }



Mime
View raw message