use of com.adaptris.core.stubs.EventHandlerAwareProducer in project interlok by adaptris.
the class StandardWorkflowTest method testInitialiseWithEventAware.
@Test
public void testInitialiseWithEventAware() throws Exception {
EventHandlerAwareProducer prod = new EventHandlerAwareProducer();
EventHandlerAwareConsumer cons = new EventHandlerAwareConsumer();
EventHandlerAwareService service = new EventHandlerAwareService();
MockChannel channel = createChannel(prod, Arrays.asList(new Service[] { service }));
((WorkflowImp) channel.getWorkflowList().get(0)).setConsumer(cons);
log.error("------------{}---------------", getName());
channel.requestInit();
EventHandler eh = channel.obtainEventHandler();
log.error("Obtained [{}]", eh);
log.error("------------{}---------------", getName());
assertEquals(eh, prod.retrieveEventHandler());
assertEquals(eh, cons.retrieveEventHandler());
assertEquals(eh, service.retrieveEventHandler());
}
Aggregations