use of org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.ListToAmqpListConverter in project qpid-broker-j by apache.
the class MessageConverter_0_8_to_1_0Test method testConvertAmqpListMessageBody.
@Test
public void testConvertAmqpListMessageBody() throws Exception {
final List<Object> expected = Lists.newArrayList("apple", 43, 31.42D);
final byte[] messageBytes = new ListToAmqpListConverter().toMimeContent(expected);
final String mimeType = "amqp/list";
doTestStreamMessage(messageBytes, mimeType, expected, JmsMessageTypeAnnotation.STREAM_MESSAGE.getType());
}
use of org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.ListToAmqpListConverter in project qpid-broker-j by apache.
the class MessageConverter_Internal_to_0_8Test method testListMessageWithoutMimeTypeWithNonJmsContent.
@Test
public void testListMessageWithoutMimeTypeWithNonJmsContent() throws Exception {
ArrayList<?> content = Lists.newArrayList("testItem", 37.5, 42, Lists.newArrayList());
final ListToAmqpListConverter listToAmqpListConverter = new ListToAmqpListConverter();
final byte[] expectedContent = listToAmqpListConverter.toMimeContent(content);
doTest(content, null, expectedContent, listToAmqpListConverter.getMimeType());
}
use of org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.ListToAmqpListConverter in project qpid-broker-j by apache.
the class MessageConverter_0_8_to_InternalTest method testConvertAmqpListMessageBody.
@Test
public void testConvertAmqpListMessageBody() throws Exception {
final List<Object> expected = Lists.newArrayList("apple", 43, 31.42D);
final byte[] messageBytes = new ListToAmqpListConverter().toMimeContent(expected);
doTestStreamMessage(messageBytes, "amqp/list", expected);
}
use of org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.ListToAmqpListConverter in project qpid-broker-j by apache.
the class MessageConverter_0_10_to_1_0Test method testConvertAmqpListMessageBody.
@Test
public void testConvertAmqpListMessageBody() throws Exception {
final List<Object> expected = Lists.newArrayList("apple", 43, 31.42D);
final byte[] messageBytes = new ListToAmqpListConverter().toMimeContent(expected);
final String mimeType = "amqp/list";
doTestStreamMessage(messageBytes, mimeType, expected, JmsMessageTypeAnnotation.STREAM_MESSAGE.getType());
}
use of org.apache.qpid.server.protocol.v0_10.transport.mimecontentconverter.ListToAmqpListConverter in project qpid-broker-j by apache.
the class MessageConverter_0_10_to_1_0Test method testConvertAmqpListMessageBodyWithNonJmsContent.
@Test
public void testConvertAmqpListMessageBodyWithNonJmsContent() throws Exception {
final List<Object> expected = Lists.newArrayList("apple", 43, 31.42D, Lists.newArrayList("nonJMSList"));
final byte[] messageBytes = new ListToAmqpListConverter().toMimeContent(expected);
final String mimeType = "amqp/list";
doTestStreamMessage(messageBytes, mimeType, expected, null);
}
Aggregations