You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/01/05 15:22:21 UTC

[3/3] camel git commit: CAMEL-10641: Fixed test and use its own test instead of wrong copy/paste.

CAMEL-10641: Fixed test and use its own test instead of wrong copy/paste.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b2f42797
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b2f42797
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b2f42797

Branch: refs/heads/master
Commit: b2f42797fad7a68a57cd6aa0430855ba4945e05a
Parents: 65ca8e4
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Jan 5 16:21:54 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Jan 5 16:21:54 2017 +0100

----------------------------------------------------------------------
 .../camel/itest/CamelTypeConverterTest.java     |  8 +++---
 .../camel/itest/CamelTypeConverterTest.xml      | 26 ++++++++++++++++++++
 .../org/apache/camel/itest/TypeConverter        | 17 -------------
 3 files changed, 30 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b2f42797/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelTypeConverterTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelTypeConverterTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelTypeConverterTest.java
index f4f7b3b..994e730 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelTypeConverterTest.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelTypeConverterTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.itest;
 
+import java.io.ByteArrayInputStream;
 import java.net.URL;
 import java.util.Locale;
 
@@ -47,12 +48,11 @@ public class CamelTypeConverterTest extends AbstractFeatureTest {
         // install the camel blueprint xml file and the Camel converter we use in this test
         TinyBundle bundle = TinyBundles.bundle();
         // install blueprint
-        URL blueprintUrl = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelJacksonFallbackConverterTest.xml", CamelJacksonFallbackConverterTest.class.getClassLoader());
-        String name = "CamelJacksonFallbackConverterTest";
+        URL blueprintUrl = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelTypeConverterTest.xml", CamelTypeConverterTest.class.getClassLoader());
+        String name = "CamelTypeConverterTest";
         bundle.add("OSGI-INF/blueprint/blueprint-" + name.toLowerCase(Locale.ENGLISH) + ".xml", blueprintUrl);
         // install converter
-        URL converterDeclaration = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/TypeConverter", CamelJacksonFallbackConverterTest.class.getClassLoader());
-        bundle.add("META-INF/services/org/apache/camel/TypeConverter", converterDeclaration);
+        bundle.add("META-INF/services/org/apache/camel/TypeConverter", new ByteArrayInputStream("org.apache.camel.itest.typeconverter.MyConverter".getBytes()));
         bundle.add(MyConverter.class, InnerClassStrategy.NONE);
         // set bundle headers
         bundle.set("Manifest-Version", "2")

http://git-wip-us.apache.org/repos/asf/camel/blob/b2f42797/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelTypeConverterTest.xml
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelTypeConverterTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelTypeConverterTest.xml
new file mode 100644
index 0000000..bf8202b
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelTypeConverterTest.xml
@@ -0,0 +1,26 @@
+<?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.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext id="myCamel" xmlns="http://camel.apache.org/schema/blueprint">
+  </camelContext>
+
+</blueprint>

http://git-wip-us.apache.org/repos/asf/camel/blob/b2f42797/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/TypeConverter
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/TypeConverter b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/TypeConverter
deleted file mode 100644
index ddb6035..0000000
--- a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/TypeConverter
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * 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.
- */
-org.apache.camel.itest.typeconverter.MyConverter
\ No newline at end of file