use of com.adaptris.core.stubs.EventHandlerAwareService in project interlok by adaptris.
the class StandardProcessingExceptionHandlerTest method testAdapter_HasEventHandler.
@Test
public void testAdapter_HasEventHandler() throws Exception {
EventHandlerAwareService srv = new EventHandlerAwareService();
StandardProcessingExceptionHandler meh = new StandardProcessingExceptionHandler(srv);
DefaultEventHandler eventHandler = new DefaultEventHandler();
Adapter a = AdapterTest.createAdapter(getName(), eventHandler);
a.setMessageErrorHandler(meh);
try {
LifecycleHelper.init(a);
assertEquals(eventHandler, srv.retrieveEventHandler());
} finally {
LifecycleHelper.close(a);
}
}
use of com.adaptris.core.stubs.EventHandlerAwareService in project interlok by adaptris.
the class StandardProcessingExceptionHandlerTest method testWorkflow_HasEventHandler.
@Test
public void testWorkflow_HasEventHandler() throws Exception {
EventHandlerAwareService srv = new EventHandlerAwareService();
StandardProcessingExceptionHandler meh = new StandardProcessingExceptionHandler(srv);
DefaultEventHandler eventHandler = new DefaultEventHandler();
Adapter a = AdapterTest.createAdapter(getName(), eventHandler);
Channel c = new Channel();
StandardWorkflow wf = new StandardWorkflow();
wf.setMessageErrorHandler(meh);
c.getWorkflowList().add(wf);
a.getChannelList().add(c);
try {
LifecycleHelper.init(a);
assertEquals(eventHandler, srv.retrieveEventHandler());
} finally {
LifecycleHelper.close(a);
}
}
use of com.adaptris.core.stubs.EventHandlerAwareService in project interlok by adaptris.
the class RetryMessageErrorHandlerTest method testAdapter_HasEventHandler.
@Test
public void testAdapter_HasEventHandler() throws Exception {
EventHandlerAwareService srv = new EventHandlerAwareService();
RetryMessageErrorHandler meh = new RetryMessageErrorHandler(srv);
DefaultEventHandler eventHandler = new DefaultEventHandler();
Adapter a = AdapterTest.createAdapter(getName(), eventHandler);
a.setMessageErrorHandler(meh);
try {
LifecycleHelper.init(a);
assertEquals(eventHandler, srv.retrieveEventHandler());
} finally {
LifecycleHelper.close(a);
}
}
use of com.adaptris.core.stubs.EventHandlerAwareService in project interlok by adaptris.
the class RetryMessageErrorHandlerTest method testWorkflow_HasEventHandler.
@Test
public void testWorkflow_HasEventHandler() throws Exception {
EventHandlerAwareService srv = new EventHandlerAwareService();
RetryMessageErrorHandler meh = new RetryMessageErrorHandler(srv);
DefaultEventHandler eventHandler = new DefaultEventHandler();
Adapter a = AdapterTest.createAdapter(getName(), eventHandler);
Channel c = new Channel();
StandardWorkflow wf = new StandardWorkflow();
wf.setMessageErrorHandler(meh);
c.getWorkflowList().add(wf);
a.getChannelList().add(c);
try {
LifecycleHelper.init(a);
assertEquals(eventHandler, srv.retrieveEventHandler());
} finally {
LifecycleHelper.close(a);
}
}
Aggregations