use of org.apache.camel.component.reactive.streams.support.ReactiveStreamsTestService in project camel by apache.
the class CamelReactiveStreamsTest method testSameServiceReturnedFromRegistry.
@Test
public void testSameServiceReturnedFromRegistry() {
CamelReactiveStreamsService service1 = CamelReactiveStreams.get(context);
CamelReactiveStreamsService service2 = CamelReactiveStreams.get(context);
assertEquals(service1, service2);
assertTrue(service1 instanceof ReactiveStreamsTestService);
assertEquals("from-registry", ((ReactiveStreamsTestService) service1).getName());
}
use of org.apache.camel.component.reactive.streams.support.ReactiveStreamsTestService in project camel by apache.
the class CamelReactiveStreamsTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry registry = super.createRegistry();
registry.bind("dummy", new ReactiveStreamsTestService("from-registry"));
return registry;
}
use of org.apache.camel.component.reactive.streams.support.ReactiveStreamsTestService in project camel by apache.
the class CamelReactiveStreamsTest method testNamedServiceResolvedUsingFactory.
@Test
public void testNamedServiceResolvedUsingFactory() {
CamelReactiveStreamsService service1 = CamelReactiveStreams.get(context, "test-service");
assertTrue(service1 instanceof ReactiveStreamsTestService);
assertNull(((ReactiveStreamsTestService) service1).getName());
}
use of org.apache.camel.component.reactive.streams.support.ReactiveStreamsTestService in project camel by apache.
the class CamelReactiveStreamsTest method testSameNamedServiceReturnedFromRegistry.
@Test
public void testSameNamedServiceReturnedFromRegistry() {
CamelReactiveStreamsService service1 = CamelReactiveStreams.get(context, "dummy");
CamelReactiveStreamsService service2 = CamelReactiveStreams.get(context, "dummy");
assertEquals(service1, service2);
assertTrue(service1 instanceof ReactiveStreamsTestService);
assertEquals("from-registry", ((ReactiveStreamsTestService) service1).getName());
}
Aggregations