You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2009/02/25 19:27:17 UTC

svn commit: r747885 - /camel/trunk/camel-core/src/test/java/org/apache/camel/impl/StartAndStopRoutesTest.java

Author: jstrachan
Date: Wed Feb 25 18:27:17 2009
New Revision: 747885

URL: http://svn.apache.org/viewvc?rev=747885&view=rev
Log:
CAMEL-1004 - minor refactor of test method

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/StartAndStopRoutesTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/StartAndStopRoutesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/StartAndStopRoutesTest.java?rev=747885&r1=747884&r2=747885&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/StartAndStopRoutesTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/StartAndStopRoutesTest.java Wed Feb 25 18:27:17 2009
@@ -46,15 +46,15 @@
         endpointB = getMandatoryEndpoint("seda:test.b", SedaEndpoint.class);
         endpointC = getMandatoryEndpoint("seda:test.C", SedaEndpoint.class);
 
-        assertProduceConsumers("endpointA", endpointA, 0, 1);
-        assertProduceConsumers("endpointB", endpointB, 1, 0);
-        assertProduceConsumers("endpointC", endpointC, 0, 0);
+        assertProducerAndConsumerCounts("endpointA", endpointA, 0, 1);
+        assertProducerAndConsumerCounts("endpointB", endpointB, 1, 0);
+        assertProducerAndConsumerCounts("endpointC", endpointC, 0, 0);
 
         context.stopRoute(route);
 
-        assertProduceConsumers("endpointA", endpointA, 0, 0);
-        assertProduceConsumers("endpointB", endpointB, 0, 0);
-        assertProduceConsumers("endpointC", endpointC, 0, 0);
+        assertProducerAndConsumerCounts("endpointA", endpointA, 0, 0);
+        assertProducerAndConsumerCounts("endpointB", endpointB, 0, 0);
+        assertProducerAndConsumerCounts("endpointC", endpointC, 0, 0);
 
 
         // lets mutate the route...
@@ -62,9 +62,9 @@
         fromType.setUri("seda:test.C");
         context.startRoute(route);
 
-        assertProduceConsumers("endpointA", endpointA, 0, 0);
-        assertProduceConsumers("endpointB", endpointB, 1, 0);
-        assertProduceConsumers("endpointC", endpointC, 0, 1);
+        assertProducerAndConsumerCounts("endpointA", endpointA, 0, 0);
+        assertProducerAndConsumerCounts("endpointB", endpointB, 1, 0);
+        assertProducerAndConsumerCounts("endpointC", endpointC, 0, 1);
 
 
         // now lets check it works
@@ -76,7 +76,7 @@
         assertMockEndpointsSatisfied();
     }
 
-    protected void assertProduceConsumers(String name, SedaEndpoint endpoint, int producerCount, int consumerCount) {
+    protected void assertProducerAndConsumerCounts(String name, SedaEndpoint endpoint, int producerCount, int consumerCount) {
         assertCollectionSize("Producers for " + name, endpoint.getProducers(), producerCount);
         assertCollectionSize("Consumers for " + name, endpoint.getConsumers(), consumerCount);
     }