use of org.apache.qpid.server.protocol.v0_10.transport.MessageDeliveryMode in project qpid-broker-j by apache.
the class PropertyConverter_0_10_to_InternalTest method testPersistentDeliveryModeConversion.
public void testPersistentDeliveryModeConversion() {
MessageDeliveryMode deliveryMode = MessageDeliveryMode.PERSISTENT;
final DeliveryProperties deliveryProperties = new DeliveryProperties();
deliveryProperties.setDeliveryMode(deliveryMode);
MessageTransferMessage message = createTestMessage(deliveryProperties);
final InternalMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
assertTrue("Unexpected persistence", convertedMessage.isPersistent());
assertTrue("Unexpected persistence of meta data", convertedMessage.getStoredMessage().getMetaData().isPersistent());
}
use of org.apache.qpid.server.protocol.v0_10.transport.MessageDeliveryMode in project qpid-broker-j by apache.
the class PropertyConverter_0_10_to_0_8Test method testPersistentDeliveryModeConversion.
public void testPersistentDeliveryModeConversion() {
MessageDeliveryMode deliveryMode = MessageDeliveryMode.PERSISTENT;
final DeliveryProperties deliveryProperties = new DeliveryProperties();
deliveryProperties.setDeliveryMode(deliveryMode);
MessageTransferMessage message = createTestMessage(deliveryProperties);
final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
BasicContentHeaderProperties properties = convertedMessage.getContentHeaderBody().getProperties();
assertEquals("Unexpected deliveryMode", deliveryMode.getValue(), properties.getDeliveryMode());
}
use of org.apache.qpid.server.protocol.v0_10.transport.MessageDeliveryMode in project qpid-broker-j by apache.
the class PropertyConverter_0_10_to_0_8Test method testNonPersistentDeliveryModeConversion.
public void testNonPersistentDeliveryModeConversion() {
MessageDeliveryMode deliveryMode = MessageDeliveryMode.NON_PERSISTENT;
final DeliveryProperties deliveryProperties = new DeliveryProperties();
deliveryProperties.setDeliveryMode(deliveryMode);
MessageTransferMessage message = createTestMessage(deliveryProperties);
final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
BasicContentHeaderProperties properties = convertedMessage.getContentHeaderBody().getProperties();
assertEquals("Unexpected deliveryMode", deliveryMode.getValue(), properties.getDeliveryMode());
}
use of org.apache.qpid.server.protocol.v0_10.transport.MessageDeliveryMode in project qpid-broker-j by apache.
the class PropertyConverter_0_10_to_InternalTest method testNonPersistentDeliveryModeConversion.
public void testNonPersistentDeliveryModeConversion() {
MessageDeliveryMode deliveryMode = MessageDeliveryMode.NON_PERSISTENT;
final DeliveryProperties deliveryProperties = new DeliveryProperties();
deliveryProperties.setDeliveryMode(deliveryMode);
MessageTransferMessage message = createTestMessage(deliveryProperties);
final InternalMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
assertFalse("Unexpected persistence", convertedMessage.isPersistent());
assertFalse("Unexpected persistence of meta data", convertedMessage.getStoredMessage().getMetaData().isPersistent());
}
Aggregations