You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2015/09/23 17:51:01 UTC

[1/2] camel git commit: CAMEL-9072: camel-test-blueprint - Custom converter test fails

Repository: camel
Updated Branches:
  refs/heads/master 9a80efade -> 0feb25f39


CAMEL-9072: camel-test-blueprint - Custom converter test fails


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

Branch: refs/heads/master
Commit: bd500c25f2dcee47e23154f00e7718980515903a
Parents: 9a80efa
Author: Andrea Cosentino <an...@gmail.com>
Authored: Wed Sep 23 17:21:37 2015 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Wed Sep 23 17:21:37 2015 +0200

----------------------------------------------------------------------
 .../converter/CustomConverterTest.java          |  4 +--
 .../test/blueprint/converter/FooConverter.java  | 37 +++++++++++++++++++
 .../test/blueprint/converter/MyConverter.java   | 38 --------------------
 .../blueprint/converter/CustomConverterTest.xml |  2 ++
 4 files changed, 40 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bd500c25/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/CustomConverterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/CustomConverterTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/CustomConverterTest.java
index 7c6e899..663f90c 100644
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/CustomConverterTest.java
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/CustomConverterTest.java
@@ -18,12 +18,10 @@ package org.apache.camel.test.blueprint.converter;
 
 import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
 import org.apache.camel.test.blueprint.Foo;
-import org.junit.Ignore;
 import org.junit.Test;
 
-@Ignore("See CAMEL-9072")
 public class CustomConverterTest extends CamelBlueprintTestSupport {
-
+    
     @Override
     protected String getBlueprintDescriptor() {
         return "org/apache/camel/test/blueprint/converter/CustomConverterTest.xml";

http://git-wip-us.apache.org/repos/asf/camel/blob/bd500c25/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/FooConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/FooConverter.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/FooConverter.java
new file mode 100644
index 0000000..209b94f
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/FooConverter.java
@@ -0,0 +1,37 @@
+/**
+ * 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.test.blueprint.converter;
+
+import org.apache.camel.Converter;
+import org.apache.camel.TypeConverters;
+import org.apache.camel.test.blueprint.Foo;
+
+public class FooConverter implements TypeConverters {
+
+    public FooConverter() {
+    }
+    
+    @Converter
+    public Foo convertToFoo(String data) {
+        String[] s = data.split(",");
+        Foo foo = new Foo();
+        foo.setFirst(s[0]);
+        foo.setLast(s[1]);
+        return foo;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/bd500c25/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/MyConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/MyConverter.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/MyConverter.java
deleted file mode 100644
index 4672c48..0000000
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/MyConverter.java
+++ /dev/null
@@ -1,38 +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.
- */
-package org.apache.camel.test.blueprint.converter;
-
-import org.apache.camel.Converter;
-import org.apache.camel.test.blueprint.Foo;
-
-@Converter
-public final class MyConverter {
-    
-    private MyConverter() {
-        //Helper class
-    }
-
-    @Converter
-    public static Foo convertToFoo(String data) {
-        String[] s = data.split(",");
-        Foo foo = new Foo();
-        foo.setFirst(s[0]);
-        foo.setLast(s[1]);
-        return foo;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/bd500c25/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/converter/CustomConverterTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/converter/CustomConverterTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/converter/CustomConverterTest.xml
index 3b6f43b..133b711 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/converter/CustomConverterTest.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/converter/CustomConverterTest.xml
@@ -20,6 +20,8 @@
            xsi:schemaLocation="
              http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
 
+  <bean id="myFooConverter" class="org.apache.camel.test.blueprint.converter.FooConverter"/>
+  
   <camelContext xmlns="http://camel.apache.org/schema/blueprint">
 
     <route>


[2/2] camel git commit: Fixes some tests in camel-test-blueprint

Posted by ac...@apache.org.
Fixes some tests in camel-test-blueprint


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

Branch: refs/heads/master
Commit: 0feb25f39c92bf7f2d9124df505e9a03ac200f02
Parents: bd500c2
Author: Andrea Cosentino <an...@gmail.com>
Authored: Wed Sep 23 17:21:47 2015 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Wed Sep 23 17:22:26 2015 +0200

----------------------------------------------------------------------
 .../camel/test/blueprint/component/rest/FromRestGetTest.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0feb25f3/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
index 20c359d..1310546 100644
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
@@ -76,7 +76,7 @@ public class FromRestGetTest extends CamelBlueprintTestSupport {
         assertEquals("acc1", rest.getVerbs().get(0).getParams().get(0).getAccess());
         assertEquals("acc2", rest.getVerbs().get(0).getParams().get(1).getAccess());
 
-        assertEquals(300, rest.getVerbs().get(0).getResponseMsgs().get(0).getCode());
+        assertEquals("300", rest.getVerbs().get(0).getResponseMsgs().get(0).getCode());
         assertEquals("test msg", rest.getVerbs().get(0).getResponseMsgs().get(0).getMessage());
         assertEquals(Integer.class.getCanonicalName(), rest.getVerbs().get(0).getResponseMsgs().get(0).getResponseModel());