Search in sources :

Example 26 with MultiPayloadMessageFactory

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

the class ForEachTest method setUp.

@Before
public void setUp() throws Exception {
    MockitoAnnotations.openMocks(this);
    when(mock.retrieveComponentState()).thenReturn(StartedState.getInstance());
    when(mock.createName()).thenReturn(mock.getClass().getName());
    forEach = new ForEach();
    then = new ThenService();
    then.setService(mock);
    forEach.setThen(then);
    message = (MultiPayloadAdaptrisMessage) new MultiPayloadMessageFactory().newMessage("bacon", PAYLOAD_1);
    message.addPayload("cupcake", PAYLOAD_2);
}
Also used : MultiPayloadMessageFactory(com.adaptris.core.MultiPayloadMessageFactory) Before(org.junit.Before)

Aggregations

MultiPayloadMessageFactory (com.adaptris.core.MultiPayloadMessageFactory)26 MultiPayloadAdaptrisMessage (com.adaptris.core.MultiPayloadAdaptrisMessage)24 Test (org.junit.Test)23 InputStream (java.io.InputStream)5 ByteArrayInputStream (java.io.ByteArrayInputStream)4 Before (org.junit.Before)2 ServiceException (com.adaptris.core.ServiceException)1 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1