Search in sources :

Example 1 with XmlRoundTripService

use of com.adaptris.core.stubs.XmlRoundTripService in project interlok by adaptris.

the class PoolingWorkflowTest method testRedmine1681.

@Test
public void testRedmine1681() throws Exception {
    MockChannel channel = createChannel();
    PoolingWorkflow wf = (PoolingWorkflow) channel.getWorkflowList().get(0);
    MockMessageProducer meh = new MockMessageProducer();
    MockMessageProducer prod = (MockMessageProducer) wf.getProducer();
    wf.getServiceCollection().add(new XmlRoundTripService());
    channel.setMessageErrorHandler(new StandardProcessingExceptionHandler(new ServiceList(new ArrayList<Service>(Arrays.asList(new Service[] { new StandaloneProducer(meh) })))));
    try {
        start(channel);
        submitMessages(wf, 1);
        waitForMessages(prod, 1);
        assertEquals(0, meh.messageCount());
        assertEquals(1, prod.messageCount());
    } finally {
        stop(channel);
    }
}
Also used : MockChannel(com.adaptris.core.stubs.MockChannel) MockMessageProducer(com.adaptris.core.stubs.MockMessageProducer) StaticMockMessageProducer(com.adaptris.core.stubs.StaticMockMessageProducer) WaitService(com.adaptris.core.services.WaitService) XmlRoundTripService(com.adaptris.core.stubs.XmlRoundTripService) MockSkipProducerService(com.adaptris.core.stubs.MockSkipProducerService) ThrowExceptionService(com.adaptris.core.services.exception.ThrowExceptionService) XmlRoundTripService(com.adaptris.core.stubs.XmlRoundTripService) Test(org.junit.Test)

Aggregations

WaitService (com.adaptris.core.services.WaitService)1 ThrowExceptionService (com.adaptris.core.services.exception.ThrowExceptionService)1 MockChannel (com.adaptris.core.stubs.MockChannel)1 MockMessageProducer (com.adaptris.core.stubs.MockMessageProducer)1 MockSkipProducerService (com.adaptris.core.stubs.MockSkipProducerService)1 StaticMockMessageProducer (com.adaptris.core.stubs.StaticMockMessageProducer)1 XmlRoundTripService (com.adaptris.core.stubs.XmlRoundTripService)1 Test (org.junit.Test)1