You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/07/30 15:41:14 UTC

[camel] 01/03: CAMEL-13801 - camel3 - Use @BindToRegistry wherever possible, Camel-Reactive-Streams

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

commit c2ddc146cfca5429e16277f3563f6a658ebe0327
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Jul 30 17:35:51 2019 +0200

    CAMEL-13801 - camel3 - Use @BindToRegistry wherever possible, Camel-Reactive-Streams
---
 .../component/reactive/streams/DirectClientAPITest.java      | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/DirectClientAPITest.java b/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/DirectClientAPITest.java
index 5726a94..f4b7724 100644
--- a/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/DirectClientAPITest.java
+++ b/components/camel-reactive-streams/src/test/java/org/apache/camel/component/reactive/streams/DirectClientAPITest.java
@@ -23,6 +23,8 @@ import java.util.concurrent.LinkedBlockingDeque;
 import java.util.concurrent.TimeUnit;
 
 import io.reactivex.Flowable;
+
+import org.apache.camel.BindToRegistry;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
@@ -33,6 +35,9 @@ import org.junit.Test;
 import org.reactivestreams.Publisher;
 
 public class DirectClientAPITest extends ReactiveStreamsTestSupport {
+	
+	@BindToRegistry("hello")
+	private SampleBean bean = new SampleBean();
 
     @Test
     public void testFromDirect() throws Exception {
@@ -273,13 +278,6 @@ public class DirectClientAPITest extends ReactiveStreamsTestSupport {
         }
     }
 
-    @Override
-    protected JndiRegistry createRegistry() throws Exception {
-        JndiRegistry registry = super.createRegistry();
-        registry.bind("hello", new SampleBean());
-        return registry;
-    }
-
     public static class SampleBean {
 
         public String hello(String name) {