use of com.adaptris.core.stubs.StaticCounterFailFirstMockMessageProducer in project interlok by adaptris.
the class RetryOnceStandaloneProducerTest method testProducerFailsFirstTimeOnlyAsProducer.
@Test
public void testProducerFailsFirstTimeOnlyAsProducer() {
StaticCounterFailFirstMockMessageProducer producer = new StaticCounterFailFirstMockMessageProducer();
producer.setFailUntilCount(0);
producer.resetCount();
service.setProducer(producer);
try {
service.doService(AdaptrisMessageFactory.getDefaultInstance().newMessage());
} catch (Exception e) {
fail();
}
}
use of com.adaptris.core.stubs.StaticCounterFailFirstMockMessageProducer in project interlok by adaptris.
the class RetryOnceStandaloneProducerTest method testProducerFailsFirstTimeOnlyAsService.
@Test
public void testProducerFailsFirstTimeOnlyAsService() {
StaticCounterFailFirstMockMessageProducer producer = new StaticCounterFailFirstMockMessageProducer();
producer.setFailUntilCount(1);
producer.resetCount();
service.setProducer(producer);
try {
service.doService(AdaptrisMessageFactory.getDefaultInstance().newMessage());
} catch (Exception e) {
fail();
}
}
Aggregations