Repository: camel Updated Branches: refs/heads/camel-2.15.x 482194000 -> 325d3d131
CAMEL-8498 CamelContextFactoryBean missing setEndpoints method. Fixed tests Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/325d3d13 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/325d3d13 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/325d3d13 Branch: refs/heads/camel-2.15.x Commit: 325d3d131748df8471f0b3069fa1a3f3f4ef1354 Parents: 8dd4449 Author: Claus Ibsen <[email protected]> Authored: Tue Mar 17 08:05:35 2015 +0100 Committer: Claus Ibsen <[email protected]> Committed: Tue Mar 17 08:07:11 2015 +0100 ---------------------------------------------------------------------- .../spring/CamelContextFactoryBeanTest.java | 10 +++---- .../META-INF/spring/context-with-endpoint.xml | 28 -------------------- .../camel/spring/context-with-endpoint.xml | 28 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 35 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/325d3d13/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java ---------------------------------------------------------------------- diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java index 6119d56..53bddf9 100644 --- a/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java +++ b/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextFactoryBeanTest.java @@ -22,14 +22,13 @@ import java.io.StringReader; import java.io.StringWriter; import java.util.LinkedList; import java.util.List; - import javax.xml.bind.JAXBContext; import junit.framework.TestCase; - import org.apache.camel.impl.ActiveMQUuidGenerator; import org.apache.camel.impl.SimpleUuidGenerator; import org.apache.camel.spi.UuidGenerator; +import org.apache.camel.util.IOHelper; import org.custommonkey.xmlunit.XMLAssert; import org.custommonkey.xmlunit.XMLUnit; import org.springframework.context.support.StaticApplicationContext; @@ -81,15 +80,12 @@ public class CamelContextFactoryBeanTest extends TestCase { // Compare the new context with our reference context Reader expectedContext = null; try { - expectedContext = new InputStreamReader(getClass().getResourceAsStream( - "/META-INF/spring/context-with-endpoint.xml")); + expectedContext = new InputStreamReader(getClass().getResourceAsStream("/org/apache/camel/spring/context-with-endpoint.xml")); String createdContext = contextAsString(camelContext); XMLUnit.setIgnoreWhitespace(true); XMLAssert.assertXMLEqual(expectedContext, new StringReader(createdContext)); } finally { - if (expectedContext != null) { - expectedContext.close(); - } + IOHelper.close(expectedContext); } } http://git-wip-us.apache.org/repos/asf/camel/blob/325d3d13/components/camel-spring/src/test/resources/META-INF/spring/context-with-endpoint.xml ---------------------------------------------------------------------- diff --git a/components/camel-spring/src/test/resources/META-INF/spring/context-with-endpoint.xml b/components/camel-spring/src/test/resources/META-INF/spring/context-with-endpoint.xml deleted file mode 100644 index d731405..0000000 --- a/components/camel-spring/src/test/resources/META-INF/spring/context-with-endpoint.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?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. ---> - -<!-- - - An example Camel Context which can be used to test marshalling and - unmarshalling with CamelContextFactoryBean. - - --> - -<camelContext xmlns="http://camel.apache.org/schema/spring"> - <endpoint id="endpoint1" uri="mock:end"/> -</camelContext> http://git-wip-us.apache.org/repos/asf/camel/blob/325d3d13/components/camel-spring/src/test/resources/org/apache/camel/spring/context-with-endpoint.xml ---------------------------------------------------------------------- diff --git a/components/camel-spring/src/test/resources/org/apache/camel/spring/context-with-endpoint.xml b/components/camel-spring/src/test/resources/org/apache/camel/spring/context-with-endpoint.xml new file mode 100644 index 0000000..d731405 --- /dev/null +++ b/components/camel-spring/src/test/resources/org/apache/camel/spring/context-with-endpoint.xml @@ -0,0 +1,28 @@ +<?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. +--> + +<!-- + + An example Camel Context which can be used to test marshalling and + unmarshalling with CamelContextFactoryBean. + + --> + +<camelContext xmlns="http://camel.apache.org/schema/spring"> + <endpoint id="endpoint1" uri="mock:end"/> +</camelContext>
