use of com.adaptris.core.WorkflowImp in project interlok by adaptris.
the class ExampleWorkflowCase method testSetServiceCollection.
@Test
public void testSetServiceCollection() throws Exception {
WorkflowImp wf = createWorkflowForGenericTests();
ServiceCollection obj = wf.getServiceCollection();
try {
wf.setServiceCollection(null);
fail();
} catch (IllegalArgumentException e) {
}
assertEquals(obj, wf.getServiceCollection());
}
use of com.adaptris.core.WorkflowImp in project interlok by adaptris.
the class ExampleWorkflowCase method testSetConsumer.
@Test
public void testSetConsumer() throws Exception {
WorkflowImp wf = createWorkflowForGenericTests();
AdaptrisMessageConsumer obj = wf.getConsumer();
try {
wf.setConsumer(null);
fail();
} catch (IllegalArgumentException e) {
}
assertEquals(obj, wf.getConsumer());
}
use of com.adaptris.core.WorkflowImp in project interlok by adaptris.
the class ExampleWorkflowCase method testSetMessageLogger.
@Test
public void testSetMessageLogger() throws Exception {
AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage();
WorkflowImp wf = createWorkflowForGenericTests();
assertNull(wf.getMessageLogger());
assertNotNull(wf.messageLogger());
assertEquals(DefaultMessageLogger.class, wf.messageLogger().getClass());
assertNotNull(wf.messageLogger().toString(msg));
wf.setMessageLogger(new PayloadMessageLogger());
assertNotNull(wf.getMessageLogger());
assertNotNull(wf.messageLogger());
assertEquals(PayloadMessageLogger.class, wf.messageLogger().getClass());
assertNotNull(wf.messageLogger().toString(msg));
}
use of com.adaptris.core.WorkflowImp in project interlok by adaptris.
the class ExampleWorkflowCase method testSetChannelUnavailableWait.
@Test
public void testSetChannelUnavailableWait() throws Exception {
WorkflowImp wf = createWorkflowForGenericTests();
TimeInterval defaultInterval = new TimeInterval(30L, TimeUnit.SECONDS);
TimeInterval interval = new TimeInterval(10L, TimeUnit.SECONDS);
assertNull(wf.getChannelUnavailableWaitInterval());
assertEquals(defaultInterval.toMilliseconds(), wf.channelUnavailableWait());
wf.setChannelUnavailableWaitInterval(interval);
assertEquals(interval, wf.getChannelUnavailableWaitInterval());
assertNotSame(defaultInterval.toMilliseconds(), wf.channelUnavailableWait());
assertEquals(interval.toMilliseconds(), wf.channelUnavailableWait());
wf.setChannelUnavailableWaitInterval(null);
assertNull(wf.getChannelUnavailableWaitInterval());
assertEquals(defaultInterval.toMilliseconds(), wf.channelUnavailableWait());
}
use of com.adaptris.core.WorkflowImp in project interlok by adaptris.
the class ExampleWorkflowCase method testSetProducer.
@Test
public void testSetProducer() throws Exception {
WorkflowImp wf = createWorkflowForGenericTests();
AdaptrisMessageProducer obj = wf.getProducer();
try {
wf.setProducer(null);
fail();
} catch (IllegalArgumentException e) {
}
assertEquals(obj, wf.getProducer());
}
Aggregations