camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: CAMEL-8498 CamelContextFactoryBean missing setEndpoints method. Fixed tests
Date Tue, 17 Mar 2015 07:04:42 GMT
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/676ad332
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/676ad332
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/676ad332

Branch: refs/heads/master
Commit: 676ad3324d84cd876c222be3413d61842897e510
Parents: d1f7154
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Mar 17 08:05:35 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Mar 17 08:05:35 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/676ad332/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/676ad332/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/676ad332/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>


Mime
View raw message