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 2007/07/10 20:35:01 UTC

svn commit: r555029 - in /activemq/camel/trunk: camel-core/src/test/java/org/apache/camel/ components/camel-spring/src/main/java/org/apache/camel/spring/model/ components/camel-spring/src/main/resources/org/apache/camel/spring/model/ components/camel-s...

Author: jstrachan
Date: Tue Jul 10 11:35:00 2007
New Revision: 555029

URL: http://svn.apache.org/viewvc?view=rev&rev=555029
Log:
added more test cases of the various XML parsing options

Added:
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/ChoiceType.java
      - copied, changed from r555020, activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OtherwiseType.java   (with props)
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/SplitterType.java
      - copied, changed from r555020, activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/WhenType.java   (with props)
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/routeWithChoice.xml
      - copied, changed from r554600, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildSimpleRouteWithChoice.xml
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/simpleRoute.xml   (contents, props changed)
      - copied, changed from r554921, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/example1.xml
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/splitter.xml
      - copied, changed from r554600, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildSplitter.xml
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/staticRecipientList.xml
      - copied, changed from r554600, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildStaticRecipientList.xml
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/wireTap.xml
      - copied unchanged from r554600, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildWireTap.xml
Removed:
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/example1.xml
Modified:
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OutputType.java
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/RouteType.java
    activemq/camel/trunk/components/camel-spring/src/main/resources/org/apache/camel/spring/model/jaxb.index
    activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/XmlParseTest.java

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java?view=diff&rev=555029&r1=555028&r2=555029
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java Tue Jul 10 11:35:00 2007
@@ -214,4 +214,12 @@
         assertEquals("Size of list should be 1: " + list, 1, list.size());
         return list.get(0);
     }
+
+    /**
+     * Asserts that a list is of the given size
+     */
+    protected <T> List<T> assertListSize(List<T> list, int size) {
+        assertEquals("List should be of size: " + size + " but is: " + list, size, list.size());
+        return list;
+    }
 }

Copied: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/ChoiceType.java (from r555020, activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/ChoiceType.java?view=diff&rev=555029&p1=activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java&r1=555020&p2=activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/ChoiceType.java&r2=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/ChoiceType.java Tue Jul 10 11:35:00 2007
@@ -23,26 +23,38 @@
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElementRef;
 import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+import java.util.ArrayList;
 
 /**
  * @version $Revision: 1.1 $
  */
-@XmlRootElement(name = "filter")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class FilterType extends OutputType {
-    @XmlElementRef
-    private ExpressionType expression;
+@XmlRootElement(name = "choice")
+public class ChoiceType extends ProcessorType {
+    private List<WhenType> whenClauses = new ArrayList<WhenType>();
+    private OtherwiseType otherwise;
 
     @Override
     public String toString() {
-        return "Filter[if: " + getExpression() + " process: " + getOutputs() + "]";
+        return "Choice[ " + getWhenClauses() + " " + getOtherwise() + "]";
+    }
+
+    @XmlElementRef
+    public List<WhenType> getWhenClauses() {
+        return whenClauses;
     }
 
-    public ExpressionType getExpression() {
-        return expression;
+    public void setWhenClauses(List<WhenType> whenClauses) {
+        this.whenClauses = whenClauses;
     }
 
-    public void setExpression(ExpressionType expression) {
-        this.expression = expression;
+    @XmlElementRef
+    public OtherwiseType getOtherwise() {
+        return otherwise;
+    }
+
+    public void setOtherwise(OtherwiseType otherwise) {
+        this.otherwise = otherwise;
     }
 }
+

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java?view=diff&rev=555029&r1=555028&r2=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java Tue Jul 10 11:35:00 2007
@@ -35,7 +35,7 @@
 
     @Override
     public String toString() {
-        return "Filter[if: " + getExpression() + " process: " + getOutputs() + "]";
+        return "Filter[ " + getExpression() + " -> " + getOutputs() + "]";
     }
 
     public ExpressionType getExpression() {

Added: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OtherwiseType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OtherwiseType.java?view=auto&rev=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OtherwiseType.java (added)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OtherwiseType.java Tue Jul 10 11:35:00 2007
@@ -0,0 +1,38 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.model;
+
+import org.apache.camel.spring.model.language.ExpressionType;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+@XmlRootElement(name = "otherwise")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class OtherwiseType extends OutputType {
+
+    @Override
+    public String toString() {
+        return "Otherwise[" + getOutputs() + "]";
+    }
+}
\ No newline at end of file

Propchange: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OtherwiseType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OutputType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OutputType.java?view=diff&rev=555029&r1=555028&r2=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OutputType.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OutputType.java Tue Jul 10 11:35:00 2007
@@ -31,6 +31,7 @@
  */
 public abstract class OutputType extends ProcessorType {
     protected List<ProcessorType> outputs = new ArrayList<ProcessorType>();
+    private List<InterceptorRef> interceptors = new ArrayList<InterceptorRef>();
 
     @XmlElementRef
     public List<ProcessorType> getOutputs() {
@@ -41,6 +42,18 @@
         this.outputs = outputs;
     }
 
+    @XmlElementRef
+    public List<InterceptorRef> getInterceptors() {
+        return interceptors;
+    }
+
+    public void setInterceptors(List<InterceptorRef> interceptors) {
+        this.interceptors = interceptors;
+    }
+
+
+    // Fluent API
+    //-------------------------------------------------------------------------
     public FilterType filter(ExpressionType expression) {
         FilterType filter = new FilterType();
         filter.setExpression(expression);

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/RouteType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/RouteType.java?view=diff&rev=555029&r1=555028&r2=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/RouteType.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/RouteType.java Tue Jul 10 11:35:00 2007
@@ -37,7 +37,6 @@
 public class RouteType extends OutputType implements CamelContextAware, ProcessorFactory {
     private CamelContext camelContext;
     private List<FromType> inputs = new ArrayList<FromType>();
-    private List<InterceptorRef> interceptors = new ArrayList<InterceptorRef>();
 
 /*
     public Route createRoute() throws Exception {
@@ -47,7 +46,7 @@
 
     @Override
     public String toString() {
-        return "Route[from: " + inputs + " processor: " + outputs + "]";
+        return "Route[ " + inputs + " -> " + outputs + "]";
     }
 
     // Properties
@@ -60,15 +59,6 @@
 
     public void setInputs(List<FromType> inputs) {
         this.inputs = inputs;
-    }
-
-    @XmlElementRef
-    public List<InterceptorRef> getInterceptors() {
-        return interceptors;
-    }
-
-    public void setInterceptors(List<InterceptorRef> interceptors) {
-        this.interceptors = interceptors;
     }
 
     @XmlTransient

Copied: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/SplitterType.java (from r555020, activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/SplitterType.java?view=diff&rev=555029&p1=activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java&r1=555020&p2=activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/SplitterType.java&r2=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/SplitterType.java Tue Jul 10 11:35:00 2007
@@ -27,15 +27,15 @@
 /**
  * @version $Revision: 1.1 $
  */
-@XmlRootElement(name = "filter")
+@XmlRootElement(name = "splitter")
 @XmlAccessorType(XmlAccessType.FIELD)
-public class FilterType extends OutputType {
+public class SplitterType extends OutputType {
     @XmlElementRef
     private ExpressionType expression;
 
     @Override
     public String toString() {
-        return "Filter[if: " + getExpression() + " process: " + getOutputs() + "]";
+        return "Splitter[ " + getExpression() + " -> " + getOutputs() + "]";
     }
 
     public ExpressionType getExpression() {
@@ -45,4 +45,4 @@
     public void setExpression(ExpressionType expression) {
         this.expression = expression;
     }
-}
+}
\ No newline at end of file

Added: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/WhenType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/WhenType.java?view=auto&rev=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/WhenType.java (added)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/WhenType.java Tue Jul 10 11:35:00 2007
@@ -0,0 +1,47 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.model;
+
+import org.apache.camel.spring.model.language.ExpressionType;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+@XmlRootElement(name = "when")
+public class WhenType extends OutputType {
+    private ExpressionType expression;
+
+    @Override
+    public String toString() {
+        return "When[ " + getExpression() + " -> " + getOutputs() + "]";
+    }
+
+    @XmlElementRef
+    public ExpressionType getExpression() {
+        return expression;
+    }
+
+    public void setExpression(ExpressionType expression) {
+        this.expression = expression;
+    }
+}
\ No newline at end of file

Propchange: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/WhenType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/components/camel-spring/src/main/resources/org/apache/camel/spring/model/jaxb.index
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/resources/org/apache/camel/spring/model/jaxb.index?view=diff&rev=555029&r1=555028&r2=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/resources/org/apache/camel/spring/model/jaxb.index (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/resources/org/apache/camel/spring/model/jaxb.index Tue Jul 10 11:35:00 2007
@@ -1,7 +1,11 @@
 CamelContextType
+ChoiceType
 FilterType
 FromType
+OtherwiseType
 ProcessorRef
 RecipientListType
 RouteType
-ToType
\ No newline at end of file
+SplitterType
+ToType
+WhenType
\ No newline at end of file

Modified: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/XmlParseTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/XmlParseTest.java?view=diff&rev=555029&r1=555028&r2=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/XmlParseTest.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/XmlParseTest.java Tue Jul 10 11:35:00 2007
@@ -26,8 +26,8 @@
  * @version $Revision: 1.1 $
  */
 public class XmlParseTest extends XmlTestSupport {
-    public void testParseExample1Xml() throws Exception {
-        RouteType route = assertOneRoute("example1.xml");
+    public void testParseSimpleRouteXml() throws Exception {
+        RouteType route = assertOneRoute("simpleRoute.xml");
         assertFrom(route, "seda:a");
         assertTo(route, "seda:b");
     }
@@ -73,6 +73,12 @@
         assertExpression(node.getExpression(), "header", "foo");
     }
 
+    public void testParseStaticRecipientListXml() throws Exception {
+        RouteType route = assertOneRoute("staticRecipientList.xml");
+        assertFrom(route, "seda:a");
+        assertTo(route, "seda:b", "seda:c", "seda:d");
+    }
+
     public void testParseRouteWithInterceptorXml() throws Exception {
         RouteType route = assertOneRoute("routeWithInterceptor.xml");
         assertFrom(route, "seda:a");
@@ -80,6 +86,29 @@
         assertInterceptorRefs(route, "interceptor1", "interceptor2");
     }
 
+    public void testParseRouteWithChoiceXml() throws Exception {
+        RouteType route = assertOneRoute("routeWithChoice.xml");
+        assertFrom(route, "seda:a");
+
+        ChoiceType choice = assertChoice(route);
+        List<WhenType> whens = assertListSize(choice.getWhenClauses(), 2);
+        assertTo(whens.get(0), "seda:b");
+        assertTo(whens.get(1), "seda:c");
+
+        OtherwiseType otherwise = choice.getOtherwise();
+        assertNotNull("Otherwise is null", otherwise);
+        assertTo(otherwise, "seda:d");
+    }
+
+    public void testParseSplitterXml() throws Exception {
+        RouteType route = assertOneRoute("splitter.xml");
+        assertFrom(route, "seda:a");
+
+        SplitterType splitter = assertSplitter(route);
+        assertExpression(splitter.getExpression(), "xpath", "/foo/bar");
+        assertTo(splitter, "seda:b");
+    }
+
     // Implementation methods
     //-------------------------------------------------------------------------
 
@@ -89,46 +118,74 @@
         return route;
     }
 
-    protected void assertProcessor(RouteType route, String processorRef) {
-        ProcessorType processor = assertOneElement(route.getOutputs());
-        ProcessorRef to = assertIsInstanceOf(ProcessorRef.class, processor);
-        assertEquals("Processor ref", processorRef, to.getRef());
+    protected void assertFrom(RouteType route, String uri) {
+        FromType from = assertOneElement(route.getInputs());
+        assertEquals("From URI", uri, from.getUri());
     }
 
-    protected void assertTo(RouteType route, String uri) {
+    protected void assertTo(OutputType route, String uri) {
         ProcessorType processor = assertOneElement(route.getOutputs());
+        assertTo(processor, uri);
+    }
+
+    protected void assertTo(ProcessorType processor, String uri) {
+        assertTo("", processor, uri);
+    }
+
+    protected void assertTo(String message, ProcessorType processor, String uri) {
         ToType value = assertIsInstanceOf(ToType.class, processor);
-        assertEquals("To URI", uri, value.getUri());
+        String text = message + "To URI";
+        log.info("Testing: " + text + " is equal to: " + uri + " for processor: " + processor);
+        assertEquals(text, uri, value.getUri());
     }
 
-    protected void assertFrom(RouteType route, String uri) {
-        FromType from = assertOneElement(route.getInputs());
-        assertEquals("From URI", uri, from.getUri());
+    protected void assertTo(OutputType route, String... uris) {
+        List<ProcessorType> list = assertListSize(route.getOutputs(), uris.length);
+        int idx = 0;
+        for (String uri : uris) {
+            assertTo("output[" + idx + "] ", list.get(idx++), uri);
+        }
     }
 
-    protected FilterType assertFilter(RouteType route) {
+    protected void assertProcessor(OutputType route, String processorRef) {
+        ProcessorType processor = assertOneElement(route.getOutputs());
+        ProcessorRef to = assertIsInstanceOf(ProcessorRef.class, processor);
+        assertEquals("Processor ref", processorRef, to.getRef());
+    }
+
+    protected FilterType assertFilter(OutputType route) {
         ProcessorType processor = assertOneElement(route.getOutputs());
         return assertIsInstanceOf(FilterType.class, processor);
     }
 
-    protected RecipientListType assertRecipientList(RouteType route) {
+    protected RecipientListType assertRecipientList(OutputType route) {
         ProcessorType processor = assertOneElement(route.getOutputs());
         return assertIsInstanceOf(RecipientListType.class, processor);
     }
 
+    protected ChoiceType assertChoice(OutputType route) {
+        ProcessorType processor = assertOneElement(route.getOutputs());
+        return assertIsInstanceOf(ChoiceType.class, processor);
+    }
+
+    protected SplitterType assertSplitter(OutputType route) {
+        ProcessorType processor = assertOneElement(route.getOutputs());
+        return assertIsInstanceOf(SplitterType.class, processor);
+    }
+
     protected void assertExpression(ExpressionType expression, String language, String languageExpression) {
         assertNotNull("Expression should not be null!", expression);
         assertEquals("Expression language", language, expression.getLanguage());
         assertEquals("Expression", languageExpression, expression.getExpression());
     }
 
-    protected void assertInterceptorRefs(RouteType route, String... names) {
+    protected void assertInterceptorRefs(OutputType route, String... names) {
         int idx = 0;
         List<InterceptorRef> interceptors = route.getInterceptors();
         for (String name : names) {
             int nextIdx = idx + 1;
             assertTrue("Not enough interceptors! Expected: " + nextIdx + " but have: " + interceptors, nextIdx <= interceptors.size());
-            
+
             InterceptorRef interceptor = interceptors.get(idx++);
             assertEquals("Interceptor: " + idx, name, interceptor.getRef());
         }

Copied: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/routeWithChoice.xml (from r554600, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildSimpleRouteWithChoice.xml)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/routeWithChoice.xml?view=diff&rev=555029&p1=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildSimpleRouteWithChoice.xml&r1=554600&p2=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/routeWithChoice.xml&r2=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildSimpleRouteWithChoice.xml (original)
+++ activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/routeWithChoice.xml Tue Jul 10 11:35:00 2007
@@ -15,45 +15,21 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
-    ">
-
-  <!--
-        from("seda:a").choice()
-                .when(header("foo").isEqualTo("bar")).to("seda:b")
-                .when(header("foo").isEqualTo("cheese")).to("seda:c")
-                .otherwise().to("seda:d");
-  -->
-  <!-- START SNIPPET: example -->
-  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
-    <route>
-      <from uri="seda:a"/>
-      <choice>
-        <when>
-          <predicate>
-            <header name="foo"/>
-            <isEqualTo value="bar"/>
-          </predicate>
-          <to uri="seda:b"/>
-        </when>
-        <when>
-          <predicate>
-            <header name="foo"/>
-            <isEqualTo value="cheese"/>
-          </predicate>
-          <to uri="seda:c"/>
-        </when>
-        <otherwise>
-          <to uri="seda:d"/>
-        </otherwise>
-      </choice>
-    </route>
-  </camelContext>
-  <!-- END SNIPPET: example -->
-
-
-</beans>
+<camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
+  <route>
+    <from uri="seda:a"/>
+    <choice>
+      <when>
+        <javaScript>in.header == 'bar'</javaScript>
+        <to uri="seda:b"/>
+      </when>
+      <when>
+        <ognl>in.header == 'cheese'</ognl>
+        <to uri="seda:c"/>
+      </when>
+      <otherwise>
+        <to uri="seda:d"/>
+      </otherwise>
+    </choice>
+  </route>
+</camelContext>

Copied: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/simpleRoute.xml (from r554921, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/example1.xml)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/simpleRoute.xml?view=diff&rev=555029&p1=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/example1.xml&r1=554921&p2=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/simpleRoute.xml&r2=555029
==============================================================================
    (empty)

Propchange: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/simpleRoute.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/splitter.xml (from r554600, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildSplitter.xml)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/splitter.xml?view=diff&rev=555029&p1=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildSplitter.xml&r1=554600&p2=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/splitter.xml&r2=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildSplitter.xml (original)
+++ activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/splitter.xml Tue Jul 10 11:35:00 2007
@@ -15,31 +15,12 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
-    ">
-
-  <!--
-        from("seda:a").splitter(bodyAs(String.class).tokenize("\n")).to("seda:b");
-  -->
-  <!-- START SNIPPET: example -->
   <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
     <route>
       <from uri="seda:a"/>
       <splitter>
-        <recipients>
-          <bodyAs class="java.lang.String"/>
-          <tokenize token="
- "/>
-        </recipients>
+        <xpath>/foo/bar</xpath>
+        <to uri="seda:b"/>
       </splitter>
-      <to uri="seda:b"/>
     </route>
   </camelContext>
-  <!-- END SNIPPET: example -->
-
-
-</beans>

Copied: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/staticRecipientList.xml (from r554600, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildStaticRecipientList.xml)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/staticRecipientList.xml?view=diff&rev=555029&p1=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildStaticRecipientList.xml&r1=554600&p2=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/staticRecipientList.xml&r2=555029
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/xml/buildStaticRecipientList.xml (original)
+++ activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/staticRecipientList.xml Tue Jul 10 11:35:00 2007
@@ -15,28 +15,11 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
-    ">
-
-  <!--
-        from("seda:a").to("seda:b", "seda:c", "seda:d");
-  -->
-  <!-- START SNIPPET: example -->
-  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
-    <route>
-      <from uri="seda:a"/>
-      <to>
-        <uri>seda:b</uri>
-        <uri>seda:c</uri>
-        <uri>seda:d</uri>
-      </to>
-    </route>
-  </camelContext>
-  <!-- END SNIPPET: example -->
-
-
-</beans>
+<camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
+  <route>
+    <from uri="seda:a"/>
+    <to uri="seda:b"/>
+    <to uri="seda:c"/>
+    <to uri="seda:d"/>
+  </route>
+</camelContext>
\ No newline at end of file