Add karaf tests

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

Branch: refs/heads/master
Commit: c85840fc24aeb47086e10355d18941c3042118f3
Parents: d6c49bb
Author: Claus Ibsen <davscl...@apache.org>
Authored: Tue Mar 8 17:57:41 2016 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Tue Mar 8 17:57:41 2016 +0100

----------------------------------------------------------------------
 .../camel/itest/karaf/CamelHessianTest.java     | 46 +++++++++++++++++++
 .../apache/camel/itest/karaf/CamelYamlTest.java | 47 ++++++++++++++++++++
 2 files changed, 93 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c85840fc/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelHessianTest.java
----------------------------------------------------------------------
diff --git 
a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelHessianTest.java
 
b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelHessianTest.java
new file mode 100644
index 0000000..ed1be84
--- /dev/null
+++ 
b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelHessianTest.java
@@ -0,0 +1,46 @@
+/**
+ * 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.itest.karaf;
+
+import org.apache.camel.model.DataFormatDefinition;
+import org.apache.camel.model.dataformat.HessianDataFormat;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@RunWith(PaxExam.class)
+public class CamelHessianTest extends AbstractFeatureTest {
+
+    public static final String COMPONENT = extractName(CamelHessianTest.class);
+    
+    protected DataFormatDefinition createDataformatDefinition(String format) {
+        return new HessianDataFormat();
+    }
+
+    @Test
+    public void test() throws Exception {
+        testDataFormat(COMPONENT);
+    }
+
+    @Configuration
+    public static Option[] configure() {
+        return configure(COMPONENT);
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/c85840fc/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelYamlTest.java
----------------------------------------------------------------------
diff --git 
a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelYamlTest.java
 
b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelYamlTest.java
new file mode 100644
index 0000000..4990b4f
--- /dev/null
+++ 
b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelYamlTest.java
@@ -0,0 +1,47 @@
+/**
+ * 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.itest.karaf;
+
+import org.apache.camel.model.DataFormatDefinition;
+import org.apache.camel.model.dataformat.YAMLDataFormat;
+import org.apache.camel.model.dataformat.YAMLLibrary;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@RunWith(PaxExam.class)
+public class CamelYamlTest extends AbstractFeatureTest {
+
+    public static final String COMPONENT = extractName(CamelYamlTest.class);
+
+    protected DataFormatDefinition createDataformatDefinition(String format) {
+        return new YAMLDataFormat(YAMLLibrary.SnakeYAML);
+    }
+
+    @Test
+    public void test() throws Exception {
+        testDataFormat(COMPONENT);
+    }
+
+    @Configuration
+    public static Option[] configure() {
+        return configure(COMPONENT);
+    }
+
+}
\ No newline at end of file

Reply via email to