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/31 17:41:18 UTC

[1/3] camel git commit: CAMEL-10523: Move test out of camel-core to itest

Repository: camel
Updated Branches:
  refs/heads/master c76224c1a -> 56d8b5514


http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DirectVmComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DirectVmComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DirectVmComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..c43e20c
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DirectVmComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,56 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.directvm.DirectVmComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class DirectVmComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DirectVmComponent comp = context.getComponent("direct-vm", DirectVmComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("direct-vm:foo?block=false");
+
+        assertEquals("false", conf.getParameter("block"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"common\", \"required\": \"true\", \"type\": \"string\""));
+        assertTrue(json.contains("\"timeout\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\", \"type\": \"integer\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("direct-vm");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/EipDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/EipDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/EipDocumentationTest.java
new file mode 100644
index 0000000..6d96a9c
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/EipDocumentationTest.java
@@ -0,0 +1,86 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class EipDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String json = context.getEipParameterJsonSchema("from");
+        log.info(json);
+        assertNotNull("Should have found json for from", json);
+
+        assertTrue(json.contains("\"name\": \"from\""));
+        assertTrue(json.contains("\"uri\": { \"kind\": \"attribute\""));
+        assertTrue(json.contains("\"ref\": { \"kind\": \"attribute\""));
+    }
+
+    @Test
+    public void testSplitDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String json = context.getEipParameterJsonSchema("split");
+        log.info(json);
+        assertNotNull("Should have found json for split", json);
+
+        assertTrue(json.contains("\"name\": \"split\""));
+        // there should be javadoc included
+        assertTrue(json.contains("If enabled then processing each splitted messages occurs concurrently."));
+        // and it support outputs
+        assertTrue(json.contains("\"outputs\": { \"kind\": \"element\", \"required\": \"true\", \"type\": \"array\", \"javaType\""));
+    }
+
+    @Test
+    public void testSimpleDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String json = context.getEipParameterJsonSchema("simple");
+        log.info(json);
+        assertNotNull("Should have found json for simple", json);
+
+        assertTrue(json.contains("\"label\": \"language,core,java\""));
+        assertTrue(json.contains("\"name\": \"simple\""));
+    }
+
+    @Test
+    public void testFailOverDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String json = context.getEipParameterJsonSchema("failover");
+        log.info(json);
+        assertNotNull("Should have found json for failover", json);
+
+        assertTrue(json.contains("\"name\": \"failover\""));
+        assertTrue(json.contains("\"exception\": { \"kind\": \"element\", \"required\": \"false\", \"type\": \"array\""
+            + ", \"javaType\": \"java.util.List<java.lang.String>\", \"deprecated\": \"false\""));
+    }
+
+    @Test
+    public void testNotFound() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String json = context.getEipParameterJsonSchema("unknown");
+        assertNull("Should not have found json for unknown", json);
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FileComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FileComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FileComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..0794e54
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FileComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,57 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.file.FileComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class FileComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        FileComponent comp = context.getComponent("file", FileComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("file:target/foo?delete=true");
+
+        assertEquals("true", conf.getParameter("delete"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"directoryName\": { \"kind\": \"path\", \"group\": \"common\", \"required\": \"true\""));
+        assertTrue(json.contains("\"autoCreate\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\", \"type\": \"boolean\""));
+        assertTrue(json.contains("\"readLockMinAge\": { \"kind\": \"parameter\", \"group\": \"lock\", \"label\": \"consumer,lock\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("file");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/LanguageComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/LanguageComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/LanguageComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..75acaef
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/LanguageComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,56 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.language.LanguageComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class LanguageComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        LanguageComponent comp = context.getComponent("language", LanguageComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("language:simple:foo?transform=false");
+
+        assertEquals("false", conf.getParameter("transform"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"languageName\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
+        assertTrue(json.contains("\"script\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"string\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("language");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/LogComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/LogComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/LogComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..adbea39
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/LogComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,57 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.log.LogComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class LogComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        LogComponent comp = context.getComponent("log", LogComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("log:foo?level=DEBUG");
+
+        assertEquals("DEBUG", conf.getParameter("level"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"loggerName\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
+        assertTrue(json.contains("\"level\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"string\""));
+        assertTrue(json.contains("\"showBody\": { \"kind\": \"parameter\", \"group\": \"formatting\", \"label\": \"formatting\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("log");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/MockComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/MockComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/MockComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..f38fc1f
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/MockComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,66 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.mock.MockComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class MockComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        MockComponent comp = context.getComponent("mock", MockComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("mock:foo?retainFirst=10");
+
+        assertEquals("10", conf.getParameter("retainFirst"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
+        assertTrue(json.contains("\"expectedCount\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\""));
+        assertTrue(json.contains("\"retainFirst\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\""));
+    }
+
+    @Test
+    public void testEndpointExplain() throws Exception {
+        String json = context.explainEndpointJson("mock:foo?retainFirst=10", true);
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"retainFirst\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\", \"type\": \"integer\","
+            + " \"javaType\": \"int\", \"deprecated\": \"false\", \"secret\": \"false\", \"value\": \"10\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("mock");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SedaComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SedaComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SedaComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..fa94ed7
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SedaComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,56 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.seda.SedaComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class SedaComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        SedaComponent comp = context.getComponent("seda", SedaComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("seda:foo?blockWhenFull=true");
+
+        assertEquals("true", conf.getParameter("blockWhenFull"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"concurrentConsumers\": { \"kind\": \"parameter\", \"group\": \"consumer\", \"label\": \"consumer\""));
+        assertTrue(json.contains("\"timeout\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("seda");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SimpleLanguageConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SimpleLanguageConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SimpleLanguageConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..60c1545
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SimpleLanguageConfigurationAndDocumentationTest.java
@@ -0,0 +1,44 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class SimpleLanguageConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testLanguageJsonSchema() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String json = context.getLanguageParameterJsonSchema("simple");
+        assertNotNull("Should have found some auto-generated JSON", json);
+        log.info(json);
+
+        assertTrue(json.contains("\"name\": \"simple\""));
+        assertTrue(json.contains("\"modelName\": \"simple\""));
+        assertTrue(json.contains("\"resultType\": { \"kind\": \"attribute\", \"required\": \"false\", \"type\": \"string\", \"javaType\": \"java.lang.String\", \"deprecated\": \"false\""));
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/StringDataFormatConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/StringDataFormatConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/StringDataFormatConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..e110cc2
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/StringDataFormatConfigurationAndDocumentationTest.java
@@ -0,0 +1,43 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class StringDataFormatConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testDataFormatJsonSchema() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String json = context.getDataFormatParameterJsonSchema("string");
+        assertNotNull("Should have found some auto-generated JSON", json);
+        log.info(json);
+
+        assertTrue(json.contains("\"name\": \"string\""));
+        assertTrue(json.contains("\"modelName\": \"string\""));
+        assertTrue(json.contains("\"charset\": { \"kind\": \"attribute\", \"required\": \"false\", \"type\": \"string\", \"javaType\": \"java.lang.String\", \"deprecated\": \"false\""));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/TestComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/TestComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/TestComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..53394f7
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/TestComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,56 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.test.TestComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class TestComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        TestComponent comp = context.getComponent("test", TestComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("test:my:foo?timeout=1000");
+
+        assertEquals("1000", conf.getParameter("timeout"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
+        assertTrue(json.contains("\"retainFirst\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("test");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/TimerComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/TimerComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/TimerComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..e9f0647
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/TimerComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,57 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.timer.TimerComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class TimerComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        TimerComponent comp = context.getComponent("timer", TimerComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("timer:foo?period=2000");
+
+        assertEquals("2000", conf.getParameter("period"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"timerName\": { \"kind\": \"path\", \"group\": \"consumer\", \"required\": \"true\""));
+        assertTrue(json.contains("\"delay\": { \"kind\": \"parameter\", \"group\": \"consumer\", \"type\": \"integer\""));
+        assertTrue(json.contains("\"timer\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("timer");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/XsltComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/XsltComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/XsltComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..babc415
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/XsltComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,57 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.xslt.XsltComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class XsltComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        XsltComponent comp = context.getComponent("xslt", XsltComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("xslt:foo?deleteOutputFile=true");
+
+        assertEquals("true", conf.getParameter("deleteOutputFile"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"resourceUri\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
+        assertTrue(json.contains("\"allowStAX\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"boolean\""));
+        assertTrue(json.contains("\"transformerFactoryClass\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("xslt");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}


[2/3] camel git commit: CAMEL-10523: Move test out of camel-core to itest

Posted by da...@apache.org.
CAMEL-10523: Move test out of camel-core to itest


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

Branch: refs/heads/master
Commit: 57ccbe1d89764a4f569f4d95563d04205a87354b
Parents: c76224c
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jan 31 18:29:18 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jan 31 18:29:18 2017 +0100

----------------------------------------------------------------------
 ...ponentConfigurationAndDocumentationTest.java |  55 --------
 ...ponentConfigurationAndDocumentationTest.java |  55 --------
 ...ponentConfigurationAndDocumentationTest.java |  56 --------
 ...ponentConfigurationAndDocumentationTest.java | 129 ------------------
 ...ponentConfigurationAndDocumentationTest.java |  61 ---------
 ...ponentConfigurationAndDocumentationTest.java |  62 ---------
 ...ponentConfigurationAndDocumentationTest.java |  55 --------
 ...ponentConfigurationAndDocumentationTest.java |  56 --------
 ...ponentConfigurationAndDocumentationTest.java |  55 --------
 ...ponentConfigurationAndDocumentationTest.java |  56 --------
 ...ponentConfigurationAndDocumentationTest.java |  65 ----------
 ...ponentConfigurationAndDocumentationTest.java |  55 --------
 ...ponentConfigurationAndDocumentationTest.java |  55 --------
 ...ponentConfigurationAndDocumentationTest.java |  56 --------
 ...ponentConfigurationAndDocumentationTest.java |  56 --------
 .../apache/camel/impl/EipDocumentationTest.java |  79 -----------
 ...FormatConfigurationAndDocumentationTest.java |  42 ------
 ...nguageConfigurationAndDocumentationTest.java |  43 ------
 ...ponentConfigurationAndDocumentationTest.java |  56 ++++++++
 ...ponentConfigurationAndDocumentationTest.java |  56 ++++++++
 ...ponentConfigurationAndDocumentationTest.java |  57 ++++++++
 ...ponentConfigurationAndDocumentationTest.java | 130 +++++++++++++++++++
 ...ponentConfigurationAndDocumentationTest.java |  62 +++++++++
 ...ponentConfigurationAndDocumentationTest.java |  63 +++++++++
 ...ponentConfigurationAndDocumentationTest.java |  56 ++++++++
 .../camel/itest/doc/EipDocumentationTest.java   |  86 ++++++++++++
 ...ponentConfigurationAndDocumentationTest.java |  57 ++++++++
 ...ponentConfigurationAndDocumentationTest.java |  56 ++++++++
 ...ponentConfigurationAndDocumentationTest.java |  57 ++++++++
 ...ponentConfigurationAndDocumentationTest.java |  66 ++++++++++
 ...ponentConfigurationAndDocumentationTest.java |  56 ++++++++
 ...nguageConfigurationAndDocumentationTest.java |  44 +++++++
 ...FormatConfigurationAndDocumentationTest.java |  43 ++++++
 ...ponentConfigurationAndDocumentationTest.java |  56 ++++++++
 ...ponentConfigurationAndDocumentationTest.java |  57 ++++++++
 ...ponentConfigurationAndDocumentationTest.java |  57 ++++++++
 36 files changed, 1115 insertions(+), 1091 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index 3cde533..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/bean/BeanComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,55 +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.component.bean;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class BeanComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        BeanComponent comp = context.getComponent("bean", BeanComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("bean:foo?method=bar");
-
-        assertEquals("bar", conf.getParameter("method"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"method\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"string\""));
-        assertTrue(json.contains("\"cache\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\", \"type\": \"boolean\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("bean");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index f09bccf..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/browse/BrowseComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,55 +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.component.browse;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class BrowseComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        BrowseComponent comp = context.getComponent("browse", BrowseComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("browse:seda:foo?synchronous=true");
-
-        assertEquals("true", conf.getParameter("synchronous"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"common\", \"required\": \"true\", \"type\": \"string\""));
-        assertTrue(json.contains("\"synchronous\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\", \"type\": \"boolean\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("browse");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index f00a555..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/controlbus/ControlBusComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,56 +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.component.controlbus;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class ControlBusComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        ControlBusComponent comp = context.getComponent("controlbus", ControlBusComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("controlbus:route?routeId=bar&action=stop");
-
-        assertEquals("bar", conf.getParameter("routeId"));
-        assertEquals("stop", conf.getParameter("action"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"action\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"string\""));
-        assertTrue(json.contains("\"async\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"boolean\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("controlbus");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index e556f1c..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,129 +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.component.dataformat;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.util.JsonSchemaHelper;
-import org.junit.Test;
-
-public class DataFormatComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        DataFormatComponent comp = context.getComponent("dataformat", DataFormatComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("dataformaat:marshal:string?charset=iso-8859-1");
-
-        assertEquals("iso-8859-1", conf.getParameter("charset"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\", \"type\": \"string\", \"javaType\": \"java.lang.String\","
-                        + " \"deprecated\": \"false\", \"secret\": \"false\", \"description\": \"Name of data format\" }"));
-        assertTrue(json.contains("\"operation\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\", \"type\": \"string\""));
-        assertTrue(json.contains("\"synchronous\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\", \"type\": \"boolean\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("dataformat");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-    @Test
-    public void testFlatpackDefaultValue() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String json = context.getEipParameterJsonSchema("flatpack");
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"name\": \"flatpack"));
-
-        // the default value is a bit tricky as its ", which is written escaped as \"
-        assertTrue(json.contains("\"textQualifier\": { \"kind\": \"attribute\", \"required\": \"false\", \"type\": \"string\""
-                + ", \"javaType\": \"java.lang.String\", \"deprecated\": \"false\", \"secret\": \"false\", \"defaultValue\": \"\\\"\""));
-
-        List<Map<String, String>> rows = JsonSchemaHelper.parseJsonSchema("properties", json, true);
-        assertEquals(10, rows.size());
-
-        Map<String, String> found = null;
-        for (Map<String, String> row : rows) {
-            if ("textQualifier".equals(row.get("name"))) {
-                found = row;
-                break;
-            }
-        }
-        assertNotNull(found);
-        assertEquals("textQualifier", found.get("name"));
-        assertEquals("attribute", found.get("kind"));
-        assertEquals("false", found.get("required"));
-        assertEquals("string", found.get("type"));
-        assertEquals("java.lang.String", found.get("javaType"));
-        assertEquals("false", found.get("deprecated"));
-        assertEquals("false", found.get("secret"));
-        assertEquals("\"", found.get("defaultValue"));
-        assertEquals("If the text is qualified with a char such as \"", found.get("description"));
-    }
-
-    @Test
-    public void testUniVocityTsvEscapeChar() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String json = context.getEipParameterJsonSchema("univocity-tsv");
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"name\": \"univocity-tsv"));
-
-        // the default value is a bit tricky as its \, which is written escaped as \\
-        assertTrue(json.contains("\"escapeChar\": { \"kind\": \"attribute\", \"required\": \"false\", \"type\": \"string\", \"javaType\": \"java.lang.String\","
-                + " \"deprecated\": \"false\", \"secret\": \"false\", \"defaultValue\": \"\\\\\", \"description\": \"The escape character.\""));
-
-        List<Map<String, String>> rows = JsonSchemaHelper.parseJsonSchema("properties", json, true);
-        assertEquals(16, rows.size());
-
-        Map<String, String> found = null;
-        for (Map<String, String> row : rows) {
-            if ("escapeChar".equals(row.get("name"))) {
-                found = row;
-                break;
-            }
-        }
-        assertNotNull(found);
-        assertEquals("escapeChar", found.get("name"));
-        assertEquals("attribute", found.get("kind"));
-        assertEquals("false", found.get("required"));
-        assertEquals("string", found.get("type"));
-        assertEquals("java.lang.String", found.get("javaType"));
-        assertEquals("false", found.get("deprecated"));
-        assertEquals("false", found.get("secret"));
-        assertEquals("\\", found.get("defaultValue"));
-        assertEquals("The escape character.", found.get("description"));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index 32a5ede..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,61 +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.component.dataset;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class DataSetComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        DataSetComponent comp = context.getComponent("dataset", DataSetComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("dataset:foo?minRate=3&produceDelay=33&consumeDelay=333&preloadSize=3333&initialDelay=33333&disableDataSetIndex=true");
-
-        assertEquals("Unexpected endpoint configuration value for minRate", "3", conf.getParameter("minRate"));
-        assertEquals("Unexpected endpoint configuration value for produceDelay", "33", conf.getParameter("produceDelay"));
-        assertEquals("Unexpected endpoint configuration value for consumeDelay", "333", conf.getParameter("consumeDelay"));
-        assertEquals("Unexpected endpoint configuration value for preloadSize", "3333", conf.getParameter("preloadSize"));
-        assertEquals("Unexpected endpoint configuration value for initialDelay", "33333", conf.getParameter("initialDelay"));
-        assertEquals("Unexpected endpoint configuration value for disableDataSetIndex", "true", conf.getParameter("disableDataSetIndex"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"common\", \"required\": \"true\", \"type\""));
-        assertTrue(json.contains("\"kind\": \"parameter\", \"group\": \"consumer\", \"label\": \"consumer\", \"type\": \"integer\""));
-        assertTrue(json.contains("\"retainFirst\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\", \"type\": \"integer"));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("dataset");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index 72360e1..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,62 +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.component.direct;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class DirectComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        DirectComponent comp = context.getComponent("direct", DirectComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("direct:foo?block=true");
-
-        assertEquals("true", conf.getParameter("block"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"common\", \"required\": \"true\", \"type\": \"string\""));
-        assertTrue(json.contains("\"timeout\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\", \"type\": \"integer\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("direct");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-    @Test
-    public void testComponentJsonSchema() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String json = context.getComponentParameterJsonSchema("direct");
-        assertNotNull("Should have found some auto-generated JSON", json);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index fc4828c..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/directvm/DirectVmComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,55 +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.component.directvm;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class DirectVmComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        DirectVmComponent comp = context.getComponent("direct-vm", DirectVmComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("direct-vm:foo?block=false");
-
-        assertEquals("false", conf.getParameter("block"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"common\", \"required\": \"true\", \"type\": \"string\""));
-        assertTrue(json.contains("\"timeout\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\", \"type\": \"integer\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("direct-vm");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index 5db3a1a..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,56 +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.component.file;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class FileComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        FileComponent comp = context.getComponent("file", FileComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("file:target/foo?delete=true");
-
-        assertEquals("true", conf.getParameter("delete"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"directoryName\": { \"kind\": \"path\", \"group\": \"common\", \"required\": \"true\""));
-        assertTrue(json.contains("\"autoCreate\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\", \"type\": \"boolean\""));
-        assertTrue(json.contains("\"readLockMinAge\": { \"kind\": \"parameter\", \"group\": \"lock\", \"label\": \"consumer,lock\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("file");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index cb3bfdb..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/language/LanguageComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,55 +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.component.language;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class LanguageComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        LanguageComponent comp = context.getComponent("language", LanguageComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("language:simple:foo?transform=false");
-
-        assertEquals("false", conf.getParameter("transform"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"languageName\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
-        assertTrue(json.contains("\"script\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"string\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("language");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index d61c7fd..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/log/LogComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,56 +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.component.log;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class LogComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        LogComponent comp = context.getComponent("log", LogComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("log:foo?level=DEBUG");
-
-        assertEquals("DEBUG", conf.getParameter("level"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"loggerName\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
-        assertTrue(json.contains("\"level\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"string\""));
-        assertTrue(json.contains("\"showBody\": { \"kind\": \"parameter\", \"group\": \"formatting\", \"label\": \"formatting\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("log");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index 378f326..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,65 +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.component.mock;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class MockComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        MockComponent comp = context.getComponent("mock", MockComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("mock:foo?retainFirst=10");
-
-        assertEquals("10", conf.getParameter("retainFirst"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
-        assertTrue(json.contains("\"expectedCount\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\""));
-        assertTrue(json.contains("\"retainFirst\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\""));
-    }
-
-    @Test
-    public void testEndpointExplain() throws Exception {
-        String json = context.explainEndpointJson("mock:foo?retainFirst=10", true);
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"retainFirst\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\", \"type\": \"integer\","
-                + " \"javaType\": \"int\", \"deprecated\": \"false\", \"secret\": \"false\", \"value\": \"10\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("mock");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index 00700ce..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/seda/SedaComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,55 +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.component.seda;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class SedaComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        SedaComponent comp = context.getComponent("seda", SedaComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("seda:foo?blockWhenFull=true");
-
-        assertEquals("true", conf.getParameter("blockWhenFull"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"concurrentConsumers\": { \"kind\": \"parameter\", \"group\": \"consumer\", \"label\": \"consumer\""));
-        assertTrue(json.contains("\"timeout\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("seda");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index ef3d009..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/test/TestComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,55 +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.component.test;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class TestComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        TestComponent comp = context.getComponent("test", TestComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("test:my:foo?timeout=1000");
-
-        assertEquals("1000", conf.getParameter("timeout"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
-        assertTrue(json.contains("\"retainFirst\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("test");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index c8fe793..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,56 +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.component.timer;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class TimerComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        TimerComponent comp = context.getComponent("timer", TimerComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("timer:foo?period=2000");
-
-        assertEquals("2000", conf.getParameter("period"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"timerName\": { \"kind\": \"path\", \"group\": \"consumer\", \"required\": \"true\""));
-        assertTrue(json.contains("\"delay\": { \"kind\": \"parameter\", \"group\": \"consumer\", \"type\": \"integer\""));
-        assertTrue(json.contains("\"timer\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("timer");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
deleted file mode 100644
index 45d3a7e..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,56 +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.component.xslt;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentConfiguration;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.EndpointConfiguration;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class XsltComponentConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testComponentConfiguration() throws Exception {
-        XsltComponent comp = context.getComponent("xslt", XsltComponent.class);
-        EndpointConfiguration conf = comp.createConfiguration("xslt:foo?deleteOutputFile=true");
-
-        assertEquals("true", conf.getParameter("deleteOutputFile"));
-
-        ComponentConfiguration compConf = comp.createComponentConfiguration();
-        String json = compConf.createParameterJsonSchema();
-        assertNotNull(json);
-
-        assertTrue(json.contains("\"resourceUri\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
-        assertTrue(json.contains("\"allowStAX\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"boolean\""));
-        assertTrue(json.contains("\"transformerFactoryClass\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\""));
-    }
-
-    @Test
-    public void testComponentDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String html = context.getComponentDocumentation("xslt");
-        assertNotNull("Should have found some auto-generated HTML", html);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/impl/EipDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/impl/EipDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/impl/EipDocumentationTest.java
deleted file mode 100644
index d618509..0000000
--- a/camel-core/src/test/java/org/apache/camel/impl/EipDocumentationTest.java
+++ /dev/null
@@ -1,79 +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.impl;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ContextTestSupport;
-
-public class EipDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    public void testDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String json = context.getEipParameterJsonSchema("from");
-        log.info(json);
-        assertNotNull("Should have found json for from", json);
-
-        assertTrue(json.contains("\"name\": \"from\""));
-        assertTrue(json.contains("\"uri\": { \"kind\": \"attribute\""));
-        assertTrue(json.contains("\"ref\": { \"kind\": \"attribute\""));
-    }
-
-    public void testSplitDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String json = context.getEipParameterJsonSchema("split");
-        log.info(json);
-        assertNotNull("Should have found json for split", json);
-
-        assertTrue(json.contains("\"name\": \"split\""));
-        // there should be javadoc included
-        assertTrue(json.contains("If enabled then processing each splitted messages occurs concurrently."));
-        // and it support outputs
-        assertTrue(json.contains("\"outputs\": { \"kind\": \"element\", \"required\": \"true\", \"type\": \"array\", \"javaType\""));
-    }
-
-    public void testSimpleDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String json = context.getEipParameterJsonSchema("simple");
-        log.info(json);
-        assertNotNull("Should have found json for simple", json);
-
-        assertTrue(json.contains("\"label\": \"language,core,java\""));
-        assertTrue(json.contains("\"name\": \"simple\""));
-    }
-
-    public void testFailOverDocumentation() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String json = context.getEipParameterJsonSchema("failover");
-        log.info(json);
-        assertNotNull("Should have found json for failover", json);
-
-        assertTrue(json.contains("\"name\": \"failover\""));
-        assertTrue(json.contains("\"exception\": { \"kind\": \"element\", \"required\": \"false\", \"type\": \"array\""
-                + ", \"javaType\": \"java.util.List<java.lang.String>\", \"deprecated\": \"false\""));
-    }
-
-    public void testNotFound() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String json = context.getEipParameterJsonSchema("unknown");
-        assertNull("Should not have found json for unknown", json);
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/impl/StringDataFormatConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/impl/StringDataFormatConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/impl/StringDataFormatConfigurationAndDocumentationTest.java
deleted file mode 100644
index 1f50605..0000000
--- a/camel-core/src/test/java/org/apache/camel/impl/StringDataFormatConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,42 +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.impl;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ContextTestSupport;
-import org.junit.Test;
-
-public class StringDataFormatConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testDataFormatJsonSchema() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String json = context.getDataFormatParameterJsonSchema("string");
-        assertNotNull("Should have found some auto-generated JSON", json);
-        log.info(json);
-
-        assertTrue(json.contains("\"name\": \"string\""));
-        assertTrue(json.contains("\"modelName\": \"string\""));
-        assertTrue(json.contains("\"charset\": { \"kind\": \"attribute\", \"required\": \"false\", \"type\": \"string\", \"javaType\": \"java.lang.String\", \"deprecated\": \"false\""));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/camel-core/src/test/java/org/apache/camel/language/simple/SimpleLanguageConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/language/simple/SimpleLanguageConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/language/simple/SimpleLanguageConfigurationAndDocumentationTest.java
deleted file mode 100644
index 77b291b..0000000
--- a/camel-core/src/test/java/org/apache/camel/language/simple/SimpleLanguageConfigurationAndDocumentationTest.java
+++ /dev/null
@@ -1,43 +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.language.simple;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
-
-public class SimpleLanguageConfigurationAndDocumentationTest extends ContextTestSupport {
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Test
-    public void testLanguageJsonSchema() throws Exception {
-        CamelContext context = new DefaultCamelContext();
-        String json = context.getLanguageParameterJsonSchema("simple");
-        assertNotNull("Should have found some auto-generated JSON", json);
-        log.info(json);
-
-        assertTrue(json.contains("\"name\": \"simple\""));
-        assertTrue(json.contains("\"modelName\": \"simple\""));
-        assertTrue(json.contains("\"resultType\": { \"kind\": \"attribute\", \"required\": \"false\", \"type\": \"string\", \"javaType\": \"java.lang.String\", \"deprecated\": \"false\""));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/BeanComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/BeanComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/BeanComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..f9be799
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/BeanComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,56 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.bean.BeanComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class BeanComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        BeanComponent comp = context.getComponent("bean", BeanComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("bean:foo?method=bar");
+
+        assertEquals("bar", conf.getParameter("method"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"method\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"string\""));
+        assertTrue(json.contains("\"cache\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\", \"type\": \"boolean\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("bean");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/BrowseComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/BrowseComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/BrowseComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..3b607cc
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/BrowseComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,56 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.browse.BrowseComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class BrowseComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        BrowseComponent comp = context.getComponent("browse", BrowseComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("browse:seda:foo?synchronous=true");
+
+        assertEquals("true", conf.getParameter("synchronous"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"common\", \"required\": \"true\", \"type\": \"string\""));
+        assertTrue(json.contains("\"synchronous\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\", \"type\": \"boolean\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("browse");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/ControlBusComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/ControlBusComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/ControlBusComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..344f20a
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/ControlBusComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,57 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.controlbus.ControlBusComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class ControlBusComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        ControlBusComponent comp = context.getComponent("controlbus", ControlBusComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("controlbus:route?routeId=bar&action=stop");
+
+        assertEquals("bar", conf.getParameter("routeId"));
+        assertEquals("stop", conf.getParameter("action"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"action\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"string\""));
+        assertTrue(json.contains("\"async\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"boolean\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("controlbus");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DataFormatComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DataFormatComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DataFormatComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..33f732b
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DataFormatComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,130 @@
+/**
+ * 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.doc;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.dataformat.DataFormatComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.JsonSchemaHelper;
+import org.junit.Test;
+
+public class DataFormatComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DataFormatComponent comp = context.getComponent("dataformat", DataFormatComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("dataformaat:marshal:string?charset=iso-8859-1");
+
+        assertEquals("iso-8859-1", conf.getParameter("charset"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\", \"type\": \"string\", \"javaType\": \"java.lang.String\","
+            + " \"deprecated\": \"false\", \"secret\": \"false\", \"description\": \"Name of data format\" }"));
+        assertTrue(json.contains("\"operation\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\", \"type\": \"string\""));
+        assertTrue(json.contains("\"synchronous\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\", \"type\": \"boolean\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("dataformat");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+    @Test
+    public void testFlatpackDefaultValue() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String json = context.getEipParameterJsonSchema("flatpack");
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"name\": \"flatpack"));
+
+        // the default value is a bit tricky as its ", which is written escaped as \"
+        assertTrue(json.contains("\"textQualifier\": { \"kind\": \"attribute\", \"required\": \"false\", \"type\": \"string\""
+            + ", \"javaType\": \"java.lang.String\", \"deprecated\": \"false\", \"secret\": \"false\", \"defaultValue\": \"\\\"\""));
+
+        List<Map<String, String>> rows = JsonSchemaHelper.parseJsonSchema("properties", json, true);
+        assertEquals(10, rows.size());
+
+        Map<String, String> found = null;
+        for (Map<String, String> row : rows) {
+            if ("textQualifier".equals(row.get("name"))) {
+                found = row;
+                break;
+            }
+        }
+        assertNotNull(found);
+        assertEquals("textQualifier", found.get("name"));
+        assertEquals("attribute", found.get("kind"));
+        assertEquals("false", found.get("required"));
+        assertEquals("string", found.get("type"));
+        assertEquals("java.lang.String", found.get("javaType"));
+        assertEquals("false", found.get("deprecated"));
+        assertEquals("false", found.get("secret"));
+        assertEquals("\"", found.get("defaultValue"));
+        assertEquals("If the text is qualified with a char such as \"", found.get("description"));
+    }
+
+    @Test
+    public void testUniVocityTsvEscapeChar() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String json = context.getEipParameterJsonSchema("univocity-tsv");
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"name\": \"univocity-tsv"));
+
+        // the default value is a bit tricky as its \, which is written escaped as \\
+        assertTrue(json.contains("\"escapeChar\": { \"kind\": \"attribute\", \"required\": \"false\", \"type\": \"string\", \"javaType\": \"java.lang.String\","
+            + " \"deprecated\": \"false\", \"secret\": \"false\", \"defaultValue\": \"\\\\\", \"description\": \"The escape character.\""));
+
+        List<Map<String, String>> rows = JsonSchemaHelper.parseJsonSchema("properties", json, true);
+        assertEquals(16, rows.size());
+
+        Map<String, String> found = null;
+        for (Map<String, String> row : rows) {
+            if ("escapeChar".equals(row.get("name"))) {
+                found = row;
+                break;
+            }
+        }
+        assertNotNull(found);
+        assertEquals("escapeChar", found.get("name"));
+        assertEquals("attribute", found.get("kind"));
+        assertEquals("false", found.get("required"));
+        assertEquals("string", found.get("type"));
+        assertEquals("java.lang.String", found.get("javaType"));
+        assertEquals("false", found.get("deprecated"));
+        assertEquals("false", found.get("secret"));
+        assertEquals("\\", found.get("defaultValue"));
+        assertEquals("The escape character.", found.get("description"));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DataSetComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DataSetComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DataSetComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..5a41c1f
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DataSetComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,62 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.dataset.DataSetComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class DataSetComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DataSetComponent comp = context.getComponent("dataset", DataSetComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("dataset:foo?minRate=3&produceDelay=33&consumeDelay=333&preloadSize=3333&initialDelay=33333&disableDataSetIndex=true");
+
+        assertEquals("Unexpected endpoint configuration value for minRate", "3", conf.getParameter("minRate"));
+        assertEquals("Unexpected endpoint configuration value for produceDelay", "33", conf.getParameter("produceDelay"));
+        assertEquals("Unexpected endpoint configuration value for consumeDelay", "333", conf.getParameter("consumeDelay"));
+        assertEquals("Unexpected endpoint configuration value for preloadSize", "3333", conf.getParameter("preloadSize"));
+        assertEquals("Unexpected endpoint configuration value for initialDelay", "33333", conf.getParameter("initialDelay"));
+        assertEquals("Unexpected endpoint configuration value for disableDataSetIndex", "true", conf.getParameter("disableDataSetIndex"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"common\", \"required\": \"true\", \"type\""));
+        assertTrue(json.contains("\"kind\": \"parameter\", \"group\": \"consumer\", \"label\": \"consumer\", \"type\": \"integer\""));
+        assertTrue(json.contains("\"retainFirst\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\", \"type\": \"integer"));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("dataset");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/57ccbe1d/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DirectComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DirectComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DirectComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..40ea1b8
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/DirectComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,63 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.direct.DirectComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class DirectComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        DirectComponent comp = context.getComponent("direct", DirectComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("direct:foo?block=true");
+
+        assertEquals("true", conf.getParameter("block"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"common\", \"required\": \"true\", \"type\": \"string\""));
+        assertTrue(json.contains("\"timeout\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\", \"type\": \"integer\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("direct");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+    @Test
+    public void testComponentJsonSchema() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String json = context.getComponentParameterJsonSchema("direct");
+        assertNotNull("Should have found some auto-generated JSON", json);
+    }
+
+}


[3/3] camel git commit: CAMEL-10523: Added more test

Posted by da...@apache.org.
CAMEL-10523: Added more test


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

Branch: refs/heads/master
Commit: 56d8b551433727ce7c6d5b9b0d0612e9d37598a6
Parents: 57ccbe1
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jan 31 18:38:57 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jan 31 18:41:06 2017 +0100

----------------------------------------------------------------------
 ...ponentConfigurationAndDocumentationTest.java | 58 ++++++++++++++++++++
 ...nguageConfigurationAndDocumentationTest.java | 43 +++++++++++++++
 2 files changed, 101 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/56d8b551/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FtpComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FtpComponentConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FtpComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..7765360
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FtpComponentConfigurationAndDocumentationTest.java
@@ -0,0 +1,58 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.component.file.remote.FtpComponent;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class FtpComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testComponentConfiguration() throws Exception {
+        FtpComponent comp = context.getComponent("ftp", FtpComponent.class);
+        EndpointConfiguration conf = comp.createConfiguration("ftp://myhost?username=foo&password=secret&soTimeout=1234");
+
+        assertEquals("foo", conf.getParameter("username"));
+        assertEquals("secret", conf.getParameter("password"));
+        assertEquals("1234", conf.getParameter("soTimeout"));
+
+        ComponentConfiguration compConf = comp.createComponentConfiguration();
+        String json = compConf.createParameterJsonSchema();
+        assertNotNull(json);
+
+        assertTrue(json.contains("\"minDepth\": { \"kind\": \"parameter\", \"group\": \"filter\", \"label\": \"consumer,filter\", \"type\": \"integer\", \"javaType\": \"int\""));
+        assertTrue(json.contains("\"username\": { \"kind\": \"parameter\", \"group\": \"security\", \"label\": \"security\", \"type\": \"string\""));
+    }
+
+    @Test
+    public void testComponentDocumentation() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String html = context.getComponentDocumentation("ftp");
+        assertNotNull("Should have found some auto-generated HTML", html);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/56d8b551/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/GroovyLanguageConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/GroovyLanguageConfigurationAndDocumentationTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/GroovyLanguageConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..3adcc48
--- /dev/null
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/GroovyLanguageConfigurationAndDocumentationTest.java
@@ -0,0 +1,43 @@
+/**
+ * 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.doc;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class GroovyLanguageConfigurationAndDocumentationTest extends CamelTestSupport {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    @Test
+    public void testLanguageJsonSchema() throws Exception {
+        CamelContext context = new DefaultCamelContext();
+        String json = context.getLanguageParameterJsonSchema("groovy");
+        assertNotNull("Should have found some auto-generated JSON", json);
+        log.info(json);
+
+        assertTrue(json.contains("\"name\": \"groovy\""));
+        assertTrue(json.contains("\"modelName\": \"groovy\""));
+    }
+
+}
+