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 2014/06/11 15:10:26 UTC
[1/2] git commit: Fix for CAMEL-7498. Most of this was already done,
just adding a test here
Repository: camel
Updated Branches:
refs/heads/master 85f65613d -> 7a98b543f
Fix for CAMEL-7498. Most of this was already done, just adding a test here
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b66df8b7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b66df8b7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b66df8b7
Branch: refs/heads/master
Commit: b66df8b76357fd4f292a40f0d4c12b49dc88d50c
Parents: 6a02d8e
Author: Kevin Earls <ke...@kevinearls.com>
Authored: Wed Jun 11 14:22:41 2014 +0200
Committer: Kevin Earls <ke...@kevinearls.com>
Committed: Wed Jun 11 14:22:41 2014 +0200
----------------------------------------------------------------------
...ponentConfigurationAndDocumentationTest.java | 58 ++++++++++++++++++++
1 file changed, 58 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/b66df8b7/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlComponentConfigurationAndDocumentationTest.java b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlComponentConfigurationAndDocumentationTest.java
new file mode 100644
index 0000000..f6605c6
--- /dev/null
+++ b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlComponentConfigurationAndDocumentationTest.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.component.sql;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ComponentConfiguration;
+import org.apache.camel.EndpointConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+import javax.swing.*;
+
+public class SqlComponentConfigurationAndDocumentationTest extends CamelTestSupport {
+
+ @Override
+ public boolean isUseRouteBuilder() {
+ return false;
+ }
+
+ @Test
+ public void testComponentConfiguration() throws Exception {
+ SqlComponent comp = context.getComponent("sql", SqlComponent.class);
+ EndpointConfiguration conf = comp.createConfiguration("sql:select?dataSourceRef=jdbc/myDataSource&allowNamedParameters=true");
+
+ assertEquals("jdbc/myDataSource", conf.getParameter("dataSourceRef"));
+ assertEquals("true", conf.getParameter("allowNamedParameters"));
+
+ ComponentConfiguration compConf = comp.createComponentConfiguration();
+ String json = compConf.createParameterJsonSchema();
+ assertNotNull(json);
+
+ assertTrue(json.contains("\"onConsumeBatchComplete\": { \"type\": \"java.lang.String\" }"));
+ assertTrue(json.contains("\"parametersCount\": { \"type\": \"int\" }"));
+ }
+
+ @Test
+ public void testComponentDocumentation() throws Exception {
+ CamelContext context = new DefaultCamelContext();
+ String html = context.getComponentDocumentation("sql");
+ assertNotNull("Should have found some auto-generated HTML if on Java 7", html);
+ }
+
+}
[2/2] git commit: Merge branch 'CAMEL-7498' of
https://github.com/kevinearls/camel
Posted by da...@apache.org.
Merge branch 'CAMEL-7498' of https://github.com/kevinearls/camel
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7a98b543
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7a98b543
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7a98b543
Branch: refs/heads/master
Commit: 7a98b543f684fb09d1e1d74716fa0cbb7e1c9b0e
Parents: 85f6561 b66df8b
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jun 11 15:10:13 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jun 11 15:10:13 2014 +0200
----------------------------------------------------------------------
...ponentConfigurationAndDocumentationTest.java | 58 ++++++++++++++++++++
1 file changed, 58 insertions(+)
----------------------------------------------------------------------