camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r627814 - /activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
Date Thu, 14 Feb 2008 17:39:15 GMT
Author: jstrachan
Date: Thu Feb 14 09:38:53 2008
New Revision: 627814

URL: http://svn.apache.org/viewvc?rev=627814&view=rev
Log:
added test cases that we can add expectations after the messages arrive

Modified:
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java?rev=627814&r1=627813&r2=627814&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
Thu Feb 14 09:38:53 2008
@@ -78,6 +78,22 @@
         resultEndpoint.assertIsNotSatisfied();
     }
 
+    public void testExpetationsAfterMessagesArrivePass() throws Exception {
+        sendMessages(11, 12, 13, 14, 12);
+
+        MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
+        resultEndpoint.expectedMessageCount(5);
+        resultEndpoint.assertIsNotSatisfied();
+    }
+
+    public void testExpetationsAfterMessagesArriveFail() throws Exception {
+        sendMessages(11, 12, 13, 14, 12);
+
+        MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
+        resultEndpoint.expectedMessageCount(6);
+        resultEndpoint.assertIsNotSatisfied();
+    }
+
     public void testReset() throws Exception {
     	MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
     	resultEndpoint.expectedMessageCount(2);



Mime
View raw message