camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r797503 - in /camel/trunk/components/camel-spring/src: main/java/org/apache/camel/spring/util/SimpleRouteBuilder.java test/java/org/apache/camel/spring/MainExampleTest.java test/java/org/apache/camel/spring/MainTest.java
Date Fri, 24 Jul 2009 14:45:12 GMT
Author: davsclaus
Date: Fri Jul 24 14:45:12 2009
New Revision: 797503

URL: http://svn.apache.org/viewvc?rev=797503&view=rev
Log:
Removed SimpleRouteBuilder as its not needed and pops up in ctrl space list in IDE editors.

Removed:
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/util/SimpleRouteBuilder.java
Modified:
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MainExampleTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MainTest.java

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MainExampleTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MainExampleTest.java?rev=797503&r1=797502&r2=797503&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MainExampleTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MainExampleTest.java
Fri Jul 24 14:45:12 2009
@@ -17,26 +17,27 @@
 package org.apache.camel.spring;
 
 import junit.framework.TestCase;
-import org.apache.camel.spring.util.SimpleRouteBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.spring.example.MyProcessor;
 
 /**
  * @version $Revision$
  */
 public class MainExampleTest extends TestCase {
-    public void testMain() throws Exception {
-        // lets make a simple route
-        SimpleRouteBuilder builder = new SimpleRouteBuilder();
-        builder.setFromUri("file://src/test/data?noop=true");
-        builder.setBeanClass("org.apache.camel.spring.example.MyProcessor");
-        builder.setToUri("file://target/mainTest");
 
+    public void testMain() throws Exception {
         Main main = new Main();
-        main.addRouteBuilder(builder);
+        main.addRouteBuilder(new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("file://src/test/data?noop=true").process(new MyProcessor()).to("file://target/mainTest");
+            }
+        });
         main.start();
 
         // then some time later
-        Thread.sleep(3000);
+        Thread.sleep(2000);
         main.stop();
-
     }
+
 }
\ No newline at end of file

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MainTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MainTest.java?rev=797503&r1=797502&r2=797503&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MainTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/MainTest.java
Fri Jul 24 14:45:12 2009
@@ -21,8 +21,9 @@
 import junit.framework.TestCase;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.util.SimpleRouteBuilder;
+import org.apache.camel.spring.example.MyProcessor;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -34,13 +35,13 @@
 
     public void testMain() throws Exception {
         // lets make a simple route
-        SimpleRouteBuilder builder = new SimpleRouteBuilder();
-        builder.setFromUri("file://src/test/data?noop=true");
-        builder.setBeanClass("org.apache.camel.spring.example.MyProcessor");
-        builder.setToUri("mock:results");
-
         Main main = new Main();
-        main.addRouteBuilder(builder);
+        main.addRouteBuilder(new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("file://src/test/data?noop=true").process(new MyProcessor()).to("mock:results");
+            }
+        });
         main.start();
 
         List<CamelContext> contextList = main.getCamelContexts();



Mime
View raw message