use of com.adaptris.core.MultiPayloadMessageFactory in project interlok by adaptris.
the class MultiPayloadStringOutputParameterTest method testInsert.
@Test
public void testInsert() throws Exception {
MultiPayloadStringOutputParameter parameter = new MultiPayloadStringOutputParameter();
MultiPayloadAdaptrisMessage message = (MultiPayloadAdaptrisMessage) new MultiPayloadMessageFactory().newMessage();
parameter.insert(PAYLOAD, ID, message);
assertEquals(PAYLOAD, message.getContent(ID));
}
use of com.adaptris.core.MultiPayloadMessageFactory in project interlok by adaptris.
the class MultiPayloadStringOutputParameterTest method testInsertUseDefaultId.
@Test
public void testInsertUseDefaultId() throws Exception {
MultiPayloadStringOutputParameter parameter = new MultiPayloadStringOutputParameter();
MultiPayloadMessageFactory messageFactory = new MultiPayloadMessageFactory();
MultiPayloadAdaptrisMessage message = (MultiPayloadAdaptrisMessage) messageFactory.newMessage();
parameter.insert(PAYLOAD, null, message);
assertEquals(PAYLOAD, message.getContent(messageFactory.getDefaultPayloadId()));
}
use of com.adaptris.core.MultiPayloadMessageFactory in project interlok by adaptris.
the class MultiPayloadByteArrayInputParameterTest method testExtract.
@Test
public void testExtract() throws Exception {
MultiPayloadByteArrayInputParameter parameter = new MultiPayloadByteArrayInputParameter();
parameter.setPayloadId(ID);
MultiPayloadAdaptrisMessage message = (MultiPayloadAdaptrisMessage) new MultiPayloadMessageFactory().newMessage(ID, PAYLOAD);
assertArrayEquals(PAYLOAD, parameter.extract(message));
assertArrayEquals(PAYLOAD, parameter.extract(ID, message));
assertArrayEquals(PAYLOAD, parameter.extract(null, message));
}
use of com.adaptris.core.MultiPayloadMessageFactory in project interlok by adaptris.
the class MultiPayloadByteArrayOutputParameterTest method testInsert.
@Test
public void testInsert() throws Exception {
MultiPayloadByteArrayOutputParameter parameter = new MultiPayloadByteArrayOutputParameter();
MultiPayloadAdaptrisMessage message = (MultiPayloadAdaptrisMessage) new MultiPayloadMessageFactory().newMessage();
parameter.insert(PAYLOAD, ID, message);
assertArrayEquals(PAYLOAD, message.getPayload(ID));
}
use of com.adaptris.core.MultiPayloadMessageFactory in project interlok by adaptris.
the class MultiPayloadByteArrayOutputParameterTest method testInsertUseDefaultId.
@Test
public void testInsertUseDefaultId() throws Exception {
MultiPayloadByteArrayOutputParameter parameter = new MultiPayloadByteArrayOutputParameter();
MultiPayloadMessageFactory messageFactory = new MultiPayloadMessageFactory();
MultiPayloadAdaptrisMessage message = (MultiPayloadAdaptrisMessage) messageFactory.newMessage();
parameter.insert(PAYLOAD, null, message);
assertArrayEquals(PAYLOAD, message.getPayload(messageFactory.getDefaultPayloadId()));
}
Aggregations