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 4dc1278  Camel-Fhir: Use BindToRegistry annotation where possible
4dc1278 is described below

commit 4dc12784406e622e8b064c91ab521642ac1ecc51
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Wed Jul 24 08:50:45 2019 +0200

    Camel-Fhir: Use BindToRegistry annotation where possible
---
 .../component/fhir/FhirCustomClientConfigurationIT.java  | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java
 
b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java
index 36060fc..d94cf29 100644
--- 
a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java
+++ 
b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java
@@ -47,6 +47,8 @@ import ca.uhn.fhir.rest.gclient.ITransaction;
 import ca.uhn.fhir.rest.gclient.IUntypedQuery;
 import ca.uhn.fhir.rest.gclient.IUpdate;
 import ca.uhn.fhir.rest.gclient.IValidate;
+
+import org.apache.camel.BindToRegistry;
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.fhir.internal.FhirApiCollection;
@@ -68,6 +70,12 @@ public class FhirCustomClientConfigurationIT extends 
AbstractFhirTestSupport {
 
     private static final String TEST_URI_CUSTOM_CLIENT_FACTORY = "fhir://" + 
PATH_PREFIX + 
"/resource?inBody=resourceAsString&clientFactory=#customClientFactory&serverUrl=foobar";
 
+    @BindToRegistry("customClient")
+    private CustomClient client = new CustomClient();
+    
+    @BindToRegistry("customClientFactory")
+    private CustomClientFactory clientFactory = new CustomClientFactory();
+    
     @Override
     protected CamelContext createCamelContext() throws Exception {
         final CamelContext context = new DefaultCamelContext(createRegistry());
@@ -79,14 +87,6 @@ public class FhirCustomClientConfigurationIT extends 
AbstractFhirTestSupport {
         return context;
     }
 
-    @Override
-    protected JndiRegistry createRegistry() throws Exception {
-        JndiRegistry registry = super.createRegistry();
-        registry.bind("customClient", new CustomClient());
-        registry.bind("customClientFactory", new CustomClientFactory());
-        return registry;
-    }
-
     @Test
     public void testConfigurationWithCustomClient() throws Exception {
         FhirEndpoint endpoint = getMandatoryEndpoint(TEST_URI_CUSTOM_CLIENT, 
FhirEndpoint.class);

Reply via email to