camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject svn commit: r698253 - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/component/dataset/ camel-core/src/main/java/org/apache/camel/model/ camel-core/src/main/resources/org/apache/camel/model/ camel-core/src/test/java/org/apache/came...
Date Tue, 23 Sep 2008 17:30:34 GMT
Author: janstey
Date: Tue Sep 23 10:30:33 2008
New Revision: 698253

URL: http://svn.apache.org/viewvc?rev=698253&view=rev
Log:
CAMEL-932 - Added removeHeader, removeOutHeader, removeProperty to Spring DSL. Still need
to add test for removeOutHeader.


Added:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveHeaderType.java
  (with props)
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveOutHeaderType.java
  (with props)
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemovePropertyType.java
  (with props)
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemoveHeaderTest.java
  (with props)
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemovePropertyTest.java
  (with props)
    activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemoveHeaderTest.java
  (with props)
    activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertyTest.java
  (with props)
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removeHeader.xml
  (with props)
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removeProperty.xml
  (with props)
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
    activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java?rev=698253&r1=698252&r2=698253&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
Tue Sep 23 10:30:33 2008
@@ -143,7 +143,7 @@
     }
 
     /**
-     * Allows a delay to be specified which causes producers to pause - to simpulate slow
producers
+     * Allows a delay to be specified which causes producers to pause - to simulate slow
producers
      */
     public void setProduceDelay(long produceDelay) {
         this.produceDelay = produceDelay;

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java?rev=698253&r1=698252&r2=698253&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
Tue Sep 23 10:30:33 2008
@@ -1285,14 +1285,18 @@
      * Adds a processor which removes the header on the IN message
      */
     public Type removeHeader(String name) {
-        return process(ProcessorBuilder.removeHeader(name));
+        RemoveHeaderType answer = new RemoveHeaderType(name);
+        addOutput(answer);
+        return (Type) this;        
     }
 
     /**
      * Adds a processor which removes the header on the OUT message
      */
     public Type removeOutHeader(String name) {
-        return process(ProcessorBuilder.removeOutHeader(name));
+        RemoveOutHeaderType answer = new RemoveOutHeaderType(name);
+        addOutput(answer);
+        return (Type) this;        
     }
 
     /**
@@ -1306,7 +1310,9 @@
      * Adds a processor which removes the exchange property
      */
     public Type removeProperty(String name) {
-        return process(ProcessorBuilder.removeProperty(name));
+        RemovePropertyType answer = new RemovePropertyType(name);
+        addOutput(answer);
+        return (Type) this;        
     }
 
     /**

Added: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveHeaderType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveHeaderType.java?rev=698253&view=auto
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveHeaderType.java
(added)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveHeaderType.java
Tue Sep 23 10:30:33 2008
@@ -0,0 +1,66 @@
+/**
+ * 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.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.camel.Processor;
+import org.apache.camel.builder.ProcessorBuilder;
+import org.apache.camel.spi.RouteContext;
+
+/**
+ * Represents an XML <removeHeader/> element
+ */
+@XmlRootElement(name = "removeHeader")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class RemoveHeaderType extends OutputType<ProcessorType> {
+    @XmlAttribute
+    private String headerName;   
+    
+    public RemoveHeaderType() {
+    }
+    
+    public RemoveHeaderType(String headerName) {
+        setHeaderName(headerName);
+    }
+    
+    @Override
+    public String toString() {
+        return "RemoveHeader[ " + getHeaderName() + "]";
+    }
+
+    @Override
+    public String getShortName() {
+        return "removeHeader";
+    }
+
+    @Override
+    public Processor createProcessor(RouteContext routeContext) throws Exception {      
 
+        return ProcessorBuilder.removeHeader(getHeaderName());
+    }
+
+    public void setHeaderName(String headerName) {
+        this.headerName = headerName;
+    }
+
+    public String getHeaderName() {
+        return headerName;
+    }
+}

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveHeaderType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveOutHeaderType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveOutHeaderType.java?rev=698253&view=auto
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveOutHeaderType.java
(added)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveOutHeaderType.java
Tue Sep 23 10:30:33 2008
@@ -0,0 +1,66 @@
+/**
+ * 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.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.camel.Processor;
+import org.apache.camel.builder.ProcessorBuilder;
+import org.apache.camel.spi.RouteContext;
+
+/**
+ * Represents an XML &lt;removeOutHeader/&gt; element
+ */
+@XmlRootElement(name = "removeOutHeader")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class RemoveOutHeaderType extends OutputType<ProcessorType> {
+    @XmlAttribute
+    private String headerName;   
+    
+    public RemoveOutHeaderType() {
+    }
+    
+    public RemoveOutHeaderType(String headerName) {
+        setHeaderName(headerName);
+    }
+    
+    @Override
+    public String toString() {
+        return "RemoveOutHeader[ " + getHeaderName() + "]";
+    }
+
+    @Override
+    public String getShortName() {
+        return "removeOutHeader";
+    }
+
+    @Override
+    public Processor createProcessor(RouteContext routeContext) throws Exception {      
 
+        return ProcessorBuilder.removeOutHeader(getHeaderName());
+    }
+
+    public void setHeaderName(String headerName) {
+        this.headerName = headerName;
+    }
+
+    public String getHeaderName() {
+        return headerName;
+    }
+}

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemoveOutHeaderType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemovePropertyType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemovePropertyType.java?rev=698253&view=auto
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemovePropertyType.java
(added)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemovePropertyType.java
Tue Sep 23 10:30:33 2008
@@ -0,0 +1,66 @@
+/**
+ * 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.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.apache.camel.Processor;
+import org.apache.camel.builder.ProcessorBuilder;
+import org.apache.camel.spi.RouteContext;
+
+/**
+ * Represents an XML &lt;removeProperty/&gt; element
+ */
+@XmlRootElement(name = "removeProperty")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class RemovePropertyType extends OutputType<ProcessorType> {
+    @XmlAttribute
+    private String propertyName;   
+    
+    public RemovePropertyType() {
+    }
+    
+    public RemovePropertyType(String propertyName) {
+        setPropertyName(propertyName);
+    }
+    
+    @Override
+    public String toString() {
+        return "RemoveProperty[ " + getPropertyName() + "]";
+    }
+
+    @Override
+    public String getShortName() {
+        return "removeProperty";
+    }
+
+    @Override
+    public Processor createProcessor(RouteContext routeContext) throws Exception {      
 
+        return ProcessorBuilder.removeProperty(getPropertyName());
+    }
+
+    public void setPropertyName(String propertyName) {
+        this.propertyName = propertyName;
+    }
+
+    public String getPropertyName() {
+        return propertyName;
+    }
+}

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemovePropertyType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index?rev=698253&r1=698252&r2=698253&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index (original)
+++ activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index Tue
Sep 23 10:30:33 2008
@@ -41,6 +41,9 @@
 ProcessorRef
 RecipientListType
 RedeliveryPolicyType
+RemoveHeaderType
+RemoveOutHeaderType
+RemovePropertyType
 ResequencerType
 RouteType
 RouteBuilderRef

Added: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemoveHeaderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemoveHeaderTest.java?rev=698253&view=auto
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemoveHeaderTest.java
(added)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemoveHeaderTest.java
Tue Sep 23 10:30:33 2008
@@ -0,0 +1,71 @@
+/**
+ * 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.processor;
+
+import java.util.List;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+
+public class RemoveHeaderTest extends ContextTestSupport {
+    private MockEndpoint end;
+    private MockEndpoint mid;
+    private String headerName = "foo";
+    private String expectedHeaderValue = "bar";
+
+    public void testSetHeaderMidRouteThenRemove() throws Exception {
+        mid.expectedMessageCount(1);
+        end.expectedMessageCount(1);
+        
+        template.sendBody("direct:start", "<blah/>");
+
+        // make sure we got the message
+        assertMockEndpointsSatisfied();
+
+        List<Exchange> midExchanges = mid.getExchanges();
+        Exchange midExchange = midExchanges.get(0);
+        String actualHeaderValue = midExchange.getIn().getHeader(headerName, String.class);
+
+        assertEquals(expectedHeaderValue, actualHeaderValue);
+        
+        List<Exchange> endExchanges = end.getExchanges();
+        Exchange endExchange = endExchanges.get(0);
+        
+        // header should be removed
+        assertNull(endExchange.getIn().getHeader(headerName, String.class));        
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        end = getMockEndpoint("mock:end");
+        mid = getMockEndpoint("mock:mid");
+    }
+
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            public void configure() {
+                from("direct:start").
+                    setHeader(headerName).constant(expectedHeaderValue).to("mock:mid").
+                    removeHeader(headerName).to("mock:end");
+            }
+        };
+    }
+}

Propchange: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemoveHeaderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemovePropertyTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemovePropertyTest.java?rev=698253&view=auto
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemovePropertyTest.java
(added)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemovePropertyTest.java
Tue Sep 23 10:30:33 2008
@@ -0,0 +1,71 @@
+/**
+ * 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.processor;
+
+import java.util.List;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+
+public class RemovePropertyTest extends ContextTestSupport {
+    private MockEndpoint end;
+    private MockEndpoint mid;
+    private String propertyName = "foo";
+    private String expectedPropertyValue = "bar";
+
+    public void testSetExchangePropertyMidRouteThenRemove() throws Exception {
+        mid.expectedMessageCount(1);
+        end.expectedMessageCount(1);
+        
+        template.sendBody("direct:start", "<blah/>");
+
+        // make sure we got the message
+        assertMockEndpointsSatisfied();
+
+        List<Exchange> midExchanges = mid.getExchanges();
+        Exchange midExchange = midExchanges.get(0);
+        String actualPropertyValue = midExchange.getProperty(propertyName, String.class);
+
+        assertEquals(expectedPropertyValue, actualPropertyValue);
+        
+        List<Exchange> endExchanges = end.getExchanges();
+        Exchange endExchange = endExchanges.get(0);
+        
+        // property should be removed
+        assertNull(endExchange.getProperty(propertyName, String.class));
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        end = getMockEndpoint("mock:end");
+        mid = getMockEndpoint("mock:mid");
+    }
+
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            public void configure() {
+                from("direct:start").
+                    setProperty(propertyName).constant(expectedPropertyValue).to("mock:mid").
+                    removeProperty(propertyName).to("mock:end");
+            }
+        };
+    }
+}

Propchange: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RemovePropertyTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemoveHeaderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemoveHeaderTest.java?rev=698253&view=auto
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemoveHeaderTest.java
(added)
+++ activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemoveHeaderTest.java
Tue Sep 23 10:30:33 2008
@@ -0,0 +1,28 @@
+/**
+ * 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.processor;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.RemoveHeaderTest;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+public class SpringRemoveHeaderTest extends RemoveHeaderTest {
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this,
+                "org/apache/camel/spring/processor/removeHeader.xml");
+    }
+}

Propchange: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemoveHeaderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertyTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertyTest.java?rev=698253&view=auto
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertyTest.java
(added)
+++ activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertyTest.java
Tue Sep 23 10:30:33 2008
@@ -0,0 +1,28 @@
+/**
+ * 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.processor;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.RemovePropertyTest;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+public class SpringRemovePropertyTest extends RemovePropertyTest {
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this,
+                "org/apache/camel/spring/processor/removeProperty.xml");
+    }
+}

Propchange: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRemovePropertyTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removeHeader.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removeHeader.xml?rev=698253&view=auto
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removeHeader.xml
(added)
+++ activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removeHeader.xml
Tue Sep 23 10:30:33 2008
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<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.5.xsd
+       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
+    ">
+  <!-- START SNIPPET: example -->
+  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
+    <route>
+      <from uri="direct:start"/>      
+      <setHeader headerName="foo">
+        <constant>bar</constant>
+      </setHeader>
+      <to uri="mock:mid"/>
+      <removeHeader headerName="foo"/>
+      <to uri="mock:end"/>     
+    </route>
+  </camelContext>
+  <!-- END SNIPPET: example -->
+</beans>

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

Added: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removeProperty.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removeProperty.xml?rev=698253&view=auto
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removeProperty.xml
(added)
+++ activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/removeProperty.xml
Tue Sep 23 10:30:33 2008
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<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.5.xsd
+       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
+    ">
+  <!-- START SNIPPET: example -->
+  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
+    <route>
+      <from uri="direct:start"/>      
+      <setProperty propertyName="foo">
+        <constant>bar</constant>
+      </setProperty>
+      <to uri="mock:mid"/>
+      <removeProperty propertyName="foo"/>
+      <to uri="mock:end"/>     
+    </route>
+  </camelContext>
+  <!-- END SNIPPET: example -->
+</beans>

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



Mime
View raw message