Search in sources :

Example 1 with AdaptrisMessageProducer

use of com.adaptris.core.AdaptrisMessageProducer in project interlok by adaptris.

the class FailedMessageRetrierCase method createWorkflow.

protected StandardWorkflow createWorkflow(String uniqueId) throws Exception {
    AdaptrisMessageConsumer consumer = new MockMessageConsumer();
    AdaptrisMessageProducer producer = new MockMessageProducer();
    StandardWorkflow workflow = new StandardWorkflow();
    workflow.setUniqueId(uniqueId);
    workflow.setConsumer(consumer);
    workflow.setProducer(producer);
    Channel channel = new MockChannel();
    channel.setUniqueId(null);
    channel.getWorkflowList().add(workflow);
    channel.prepare();
    return workflow;
}
Also used : StandardWorkflow(com.adaptris.core.StandardWorkflow) MockChannel(com.adaptris.core.stubs.MockChannel) MockMessageProducer(com.adaptris.core.stubs.MockMessageProducer) AdaptrisMessageConsumer(com.adaptris.core.AdaptrisMessageConsumer) AdaptrisMessageProducer(com.adaptris.core.AdaptrisMessageProducer) MockChannel(com.adaptris.core.stubs.MockChannel) Channel(com.adaptris.core.Channel) MockMessageConsumer(com.adaptris.core.stubs.MockMessageConsumer)

Example 2 with AdaptrisMessageProducer

use of com.adaptris.core.AdaptrisMessageProducer 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());
}
Also used : AdaptrisMessageProducer(com.adaptris.core.AdaptrisMessageProducer) WorkflowImp(com.adaptris.core.WorkflowImp) Test(org.junit.Test)

Aggregations

AdaptrisMessageProducer (com.adaptris.core.AdaptrisMessageProducer)2 AdaptrisMessageConsumer (com.adaptris.core.AdaptrisMessageConsumer)1 Channel (com.adaptris.core.Channel)1 StandardWorkflow (com.adaptris.core.StandardWorkflow)1 WorkflowImp (com.adaptris.core.WorkflowImp)1 MockChannel (com.adaptris.core.stubs.MockChannel)1 MockMessageConsumer (com.adaptris.core.stubs.MockMessageConsumer)1 MockMessageProducer (com.adaptris.core.stubs.MockMessageProducer)1 Test (org.junit.Test)1