camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1065239 - /camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/IsMockEndpointsJUnit4Test.java
Date Sun, 30 Jan 2011 09:22:13 GMT
Author: davsclaus
Date: Sun Jan 30 09:22:13 2011
New Revision: 1065239

URL: http://svn.apache.org/viewvc?rev=1065239&view=rev
Log:
Added snippet for documentation.

Modified:
    camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/IsMockEndpointsJUnit4Test.java

Modified: camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/IsMockEndpointsJUnit4Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/IsMockEndpointsJUnit4Test.java?rev=1065239&r1=1065238&r2=1065239&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/IsMockEndpointsJUnit4Test.java
(original)
+++ camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/IsMockEndpointsJUnit4Test.java
Sun Jan 30 09:22:13 2011
@@ -23,15 +23,19 @@ import org.junit.Test;
 /**
  * @version $Revision$
  */
+// START SNIPPET: e1
 public class IsMockEndpointsJUnit4Test extends CamelTestSupport {
 
     @Override
     public String isMockEndpoints() {
+        // override this method and return the pattern for which endpoints to mock.
+        // use * to indicate all
         return "*";
     }
 
     @Test
     public void testMockAllEndpoints() throws Exception {
+        // notice we have automatic mocked all endpoints and the name of the endpoints is
"mock:uri"
         getMockEndpoint("mock:direct:start").expectedBodiesReceived("Hello World");
         getMockEndpoint("mock:direct:foo").expectedBodiesReceived("Hello World");
         getMockEndpoint("mock:log:foo").expectedBodiesReceived("Bye World");
@@ -64,3 +68,4 @@ public class IsMockEndpointsJUnit4Test e
         };
     }
 }
+// END SNIPPET: e1



Mime
View raw message