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

davsclaus 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 1368dd9  CAMEL-13557: Fixed test to use property binding support as 
the old has removed the legacy JDK PropertyEditor in CAMEL-13566
1368dd9 is described below

commit 1368dd9344a84833f141d42d84810f09947bf801
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sat May 25 08:59:39 2019 +0200

    CAMEL-13557: Fixed test to use property binding support as the old has 
removed the legacy JDK PropertyEditor in CAMEL-13566
---
 .../component/facebook/CamelFacebookTestSupport.java  | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git 
a/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/CamelFacebookTestSupport.java
 
b/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/CamelFacebookTestSupport.java
index cff1471..2f1faac 100644
--- 
a/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/CamelFacebookTestSupport.java
+++ 
b/components/camel-facebook/src/test/java/org/apache/camel/component/facebook/CamelFacebookTestSupport.java
@@ -22,16 +22,18 @@ import java.net.URL;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
+
+import org.apache.camel.CamelContext;
 import org.apache.camel.component.facebook.config.FacebookConfiguration;
-import org.apache.camel.support.IntrospectionSupport;
+import org.apache.camel.support.PropertyBindingSupport;
 import org.apache.camel.test.junit4.CamelTestSupport;
 
 public abstract class CamelFacebookTestSupport extends CamelTestSupport {
 
-    protected final Properties properties;
-    protected final FacebookConfiguration configuration;
+    protected Properties properties;
+    protected FacebookConfiguration configuration;
 
-    protected CamelFacebookTestSupport() throws Exception {
+    protected void loadProperties(CamelContext context) throws Exception {
         URL url = getClass().getResource("/test-options.properties");
 
         InputStream inStream;
@@ -56,7 +58,14 @@ public abstract class CamelFacebookTestSupport extends 
CamelTestSupport {
         }
 
         configuration = new FacebookConfiguration();
-        IntrospectionSupport.setProperties(configuration, options);
+        PropertyBindingSupport.bindProperties(context, configuration, options);
+    }
+
+    @Override
+    protected CamelContext createCamelContext() throws Exception {
+        CamelContext context = super.createCamelContext();
+        loadProperties(context);
+        return context;
     }
 
     protected FacebookConfiguration getConfiguration() {

Reply via email to