activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r535205 - in /activemq/camel/trunk: camel-core/src/test/java/org/apache/camel/ camel-core/src/test/java/org/apache/camel/builder/xml/ camel-core/src/test/java/org/apache/camel/processor/ camel-jms/src/test/java/org/apache/camel/component/jms/
Date Fri, 04 May 2007 12:30:22 GMT
Author: jstrachan
Date: Fri May  4 05:30:21 2007
New Revision: 535205

URL: http://svn.apache.org/viewvc?view=rev&rev=535205
Log:
minor refactor of some of the testing methods and some tidy up of the code

Modified:
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XsltTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathFilterTest.java
    activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java?view=diff&rev=535205&r1=535204&r2=535205
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
Fri May  4 05:30:21 2007
@@ -72,7 +72,7 @@
      * @param endpointUri the URI of the endpoint to send to
      * @param body the body for the message
      */
-    protected void send(String endpointUri, final Object body) {
+    protected void sendBody(String endpointUri, final Object body) {
         client.send(endpointUri, new Processor() {
             public void process(Exchange exchange) {
                 Message in = exchange.getIn();

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XsltTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XsltTest.java?view=diff&rev=535205&r1=535204&r2=535205
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XsltTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XsltTest.java
Fri May  4 05:30:21 2007
@@ -33,7 +33,7 @@
         MockEndpoint resultEndpoint = (MockEndpoint) resolveMandatoryEndpoint("mock:result");
         resultEndpoint.expectedBodiesReceived("<?xml version=\"1.0\" encoding=\"UTF-8\"?><goodbye>world!</goodbye>");
 
-        send("direct:start", "<hello>world!</hello>");
+        sendBody("direct:start", "<hello>world!</hello>");
 
         resultEndpoint.assertIsSatisfied();
     }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java?view=diff&rev=535205&r1=535204&r2=535205
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelTest.java
Fri May  4 05:30:21 2007
@@ -42,7 +42,7 @@
 
         deadEndpoint.expectedMessageCount(0);
 
-        send("direct:start", body);
+        sendBody("direct:start", body);
 
         assertIsSatisfied(deadEndpoint, successEndpoint);
     }
@@ -56,7 +56,7 @@
         deadEndpoint.message(0).header(DeadLetterChannel.REDELIVERY_COUNTER).isEqualTo(2);
         successEndpoint.expectedMessageCount(0);
 
-        send("direct:start", body);
+        sendBody("direct:start", body);
 
         assertIsSatisfied(deadEndpoint, successEndpoint);
     }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java?view=diff&rev=535205&r1=535204&r2=535205
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java
Fri May  4 05:30:21 2007
@@ -33,7 +33,7 @@
     public void testSendingAMessageUsingMulticastReceivesItsOwnExchange() throws Exception
{
         resultEndpoint.expectedBodiesReceived("Hello World!");
 
-        send("direct:start", "Hello");
+        sendBody("direct:start", "Hello");
 
         resultEndpoint.assertIsSatisfied();
     }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java?view=diff&rev=535205&r1=535204&r2=535205
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java
Fri May  4 05:30:21 2007
@@ -30,7 +30,7 @@
     public void testSendingAMessageUsingMulticastReceivesItsOwnExchange() throws Exception
{
         resultEndpoint.expectedBodiesReceived("Hello World!");
 
-        send("direct:start", "Hello");
+        sendBody("direct:start", "Hello");
 
         resultEndpoint.assertIsSatisfied();
     }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathFilterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathFilterTest.java?view=diff&rev=535205&r1=535204&r2=535205
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathFilterTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/XPathFilterTest.java
Fri May  4 05:30:21 2007
@@ -37,7 +37,7 @@
     public void testSendMatchingMessage() throws Exception {
         resultEndpoint.expectedMessageCount(1);
 
-        client.sendBody("direct:start", "<person name='James' city='London'/>");
+        sendBody("direct:start", "<person name='James' city='London'/>");
 
         resultEndpoint.assertIsSatisfied();
     }
@@ -45,8 +45,7 @@
     public void testSendNotMatchingMessage() throws Exception {
         resultEndpoint.expectedMessageCount(0);
 
-        client.sendBody("direct:start", "<person name='Hiram' city='Tampa'/>");
-
+        sendBody("direct:start", "<person name='Hiram' city='Tampa'/>");
 
         resultEndpoint.assertIsSatisfied();
     }

Modified: activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java?view=diff&rev=535205&r1=535204&r2=535205
==============================================================================
--- activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java
(original)
+++ activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java
Fri May  4 05:30:21 2007
@@ -198,7 +198,7 @@
 		mockEndpointB.expectedMinimumMessageCount(2);		
 		mockEndpointC.expectedMessageCount(0);
 		mockEndpointD.expectedMessageCount(1);
-        send("activemq:topic:f", expected);
+        sendBody("activemq:topic:f", expected);
 
         // Wait till the endpoints get their messages.
         assertWait(10, TimeUnit.SECONDS, mockEndpointA,mockEndpointB,mockEndpointC,mockEndpointD);
@@ -212,7 +212,7 @@
 	public void testSenarioA() throws Exception {
 		String expected = getName()+": "+System.currentTimeMillis();
         mockEndpointA.expectedBodiesReceived(expected);
-        send("activemq:queue:a", expected);
+        sendBody("activemq:queue:a", expected);
         assertIsSatisfied(mockEndpointA);
 	}
 
@@ -220,7 +220,7 @@
 		String expected = getName()+": "+System.currentTimeMillis();
 		mockEndpointA.expectedMessageCount(0);
         mockEndpointB.expectedMinimumMessageCount(2); // May be more since spring seems to
go into tight loop re-delivering.
-        send("activemq:queue:b", expected);
+        sendBody("activemq:queue:b", expected);
         assertIsSatisfied(5, TimeUnit.SECONDS, mockEndpointA,mockEndpointB);
 	}
 
@@ -228,7 +228,7 @@
 		String expected = getName()+": "+System.currentTimeMillis();
 		mockEndpointA.expectedMessageCount(0);
         mockEndpointB.expectedMessageCount(1); // Should only get 1 message the incoming
transaction does not rollback.
-        send("activemq:queue:c", expected);
+        sendBody("activemq:queue:c", expected);
 
         // Wait till the endpoints get their messages.
         assertWait(5, TimeUnit.SECONDS, mockEndpointA,mockEndpointB);
@@ -242,7 +242,7 @@
 	public void testSenarioD() throws Exception {
 		String expected = getName()+": "+System.currentTimeMillis();
 		mockEndpointA.expectedMessageCount(1);
-        send("activemq:queue:d", expected);
+        sendBody("activemq:queue:d", expected);
 
         // Wait till the endpoints get their messages.
         assertWait(5, TimeUnit.SECONDS, mockEndpointA,mockEndpointB);
@@ -257,7 +257,7 @@
 		String expected = getName()+": "+System.currentTimeMillis();
 		mockEndpointA.expectedMessageCount(0);
 		mockEndpointB.expectedMessageCount(1);		
-        send("activemq:queue:e", expected);
+        sendBody("activemq:queue:e", expected);
 
         // Wait till the endpoints get their messages.
         assertWait(5, TimeUnit.SECONDS, mockEndpointA,mockEndpointB);



Mime
View raw message