Updated Branches: refs/heads/camel-2.12.x ffda34a34 -> 352bfc3c5 refs/heads/master 24f8cc4ce -> 4bcf10887
Added @UriParams for camel-twitter Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4bcf1088 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4bcf1088 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4bcf1088 Branch: refs/heads/master Commit: 4bcf108874df0c138cf6cf2afbfc27fca9d1d905 Parents: 24f8cc4 Author: Claus Ibsen <[email protected]> Authored: Mon Feb 10 16:04:28 2014 +0100 Committer: Claus Ibsen <[email protected]> Committed: Mon Feb 10 16:04:28 2014 +0100 ---------------------------------------------------------------------- .../org/apache/camel/component/twitter/TwitterComponent.java | 2 +- .../apache/camel/component/twitter/UriConfigurationTest.java | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/4bcf1088/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java ---------------------------------------------------------------------- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java index 673ccd0..7b85afe 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterComponent.java @@ -33,7 +33,7 @@ public class TwitterComponent extends UriEndpointComponent { private String accessTokenSecret; public TwitterComponent() { - super(TwitterEndpoint.class); + super(TwitterEndpointEvent.class); } protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/4bcf1088/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UriConfigurationTest.java ---------------------------------------------------------------------- diff --git a/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UriConfigurationTest.java b/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UriConfigurationTest.java index 84744f2..144a730 100644 --- a/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UriConfigurationTest.java +++ b/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UriConfigurationTest.java @@ -17,6 +17,7 @@ package org.apache.camel.component.twitter; import org.apache.camel.CamelContext; +import org.apache.camel.ComponentConfiguration; import org.apache.camel.Endpoint; import org.apache.camel.EndpointConfiguration; import org.apache.camel.impl.DefaultCamelContext; @@ -78,6 +79,13 @@ public class UriConfigurationTest extends Assert { EndpointConfiguration conf = comp.createConfiguration("twitter:search?keywords=camel"); assertEquals("camel", conf.getParameter("keywords")); + + ComponentConfiguration compConf = comp.createComponentConfiguration(); + String json = compConf.createParameterJsonSchema(); + assertNotNull(json); + + assertTrue(json.contains("\"accessToken\": { \"type\": \"java.lang.String\" }")); + assertTrue(json.contains("\"consumerKey\": { \"type\": \"java.lang.String\" }")); } }
