This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 2db1570  Camel-Facebook: Use BindToRegistry where possible
2db1570 is described below

commit 2db1570e6bd9d0aa17806bef65994682d4cf05a8
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Tue Jul 23 18:19:47 2019 +0200

    Camel-Facebook: Use BindToRegistry where possible
---
 .../facebook/config/FacebookEndpointConfigurationTest.java    | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git 
a/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/config/FacebookEndpointConfigurationTest.java
 
b/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/config/FacebookEndpointConfigurationTest.java
index ade6a26..0ad60360 100644
--- 
a/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/config/FacebookEndpointConfigurationTest.java
+++ 
b/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/config/FacebookEndpointConfigurationTest.java
@@ -16,10 +16,9 @@
  */
 package org.apache.camel.component.facebook.config;
 
-
+import org.apache.camel.BindToRegistry;
 import org.apache.camel.component.facebook.FacebookComponent;
 import org.apache.camel.component.facebook.FacebookEndpoint;
-import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.test.junit4.CamelTestSupport;
 
 import org.junit.Test;
@@ -34,14 +33,12 @@ public class FacebookEndpointConfigurationTest extends 
CamelTestSupport {
         assertTrue("Configuration bean wasn't taken into account!", 
"fakeSecret".equals(facebookEndpoint.getConfiguration().getOAuthAppSecret()));
     }
 
-    @Override
-    protected JndiRegistry createRegistry() throws Exception {
-        JndiRegistry jndi = super.createRegistry();
+    @BindToRegistry("configuration")
+    public FacebookEndpointConfiguration createConf() throws Exception {
         FacebookEndpointConfiguration facebookEndpointConfiguration = new 
FacebookEndpointConfiguration();
         facebookEndpointConfiguration.setOAuthAppId("fakeId");
         facebookEndpointConfiguration.setOAuthAppSecret("fakeSecret");
-        jndi.bind("configuration", facebookEndpointConfiguration);
-        return jndi;
+        return facebookEndpointConfiguration;
     }
 
 }

Reply via email to