use of org.apache.qpid.server.protocol.v0_10.transport.DeliveryProperties in project qpid-broker-j by apache.
the class PropertyConverter_0_10_to_0_8Test method testImmediateTrueConversion.
public void testImmediateTrueConversion() {
final boolean immediate = true;
final DeliveryProperties deliveryProperties = new DeliveryProperties();
deliveryProperties.setImmediate(immediate);
MessageTransferMessage message = createTestMessage(deliveryProperties);
final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
MessagePublishInfo messagePublishInfo = convertedMessage.getMessagePublishInfo();
assertEquals("Unexpected immediate flag", immediate, messagePublishInfo.isImmediate());
}
use of org.apache.qpid.server.protocol.v0_10.transport.DeliveryProperties 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.DeliveryProperties in project qpid-broker-j by apache.
the class PropertyConverter_0_8_to_0_10Test method testPublishInfoImmediateFalseConversion.
public void testPublishInfoImmediateFalseConversion() {
final boolean immediate = false;
AMQMessage message = createTestMessage(new BasicContentHeaderProperties());
message.getMessagePublishInfo().setImmediate(immediate);
final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
final DeliveryProperties deliveryProperties = convertedMessage.getStoredMessage().getMetaData().getDeliveryProperties();
assertEquals("Unexpected immediate flag", immediate, deliveryProperties.getImmediate());
}
use of org.apache.qpid.server.protocol.v0_10.transport.DeliveryProperties in project qpid-broker-j by apache.
the class PropertyConverter_0_8_to_0_10Test method testPublishInfoMandatoryTrueConversion.
public void testPublishInfoMandatoryTrueConversion() {
final boolean mandatory = true;
AMQMessage message = createTestMessage(new BasicContentHeaderProperties());
message.getMessagePublishInfo().setMandatory(mandatory);
final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
final DeliveryProperties deliveryProperties = convertedMessage.getStoredMessage().getMetaData().getDeliveryProperties();
assertEquals("Unexpected discard-unroutable flag", !mandatory, deliveryProperties.getDiscardUnroutable());
}
use of org.apache.qpid.server.protocol.v0_10.transport.DeliveryProperties in project qpid-broker-j by apache.
the class PropertyConverter_0_8_to_0_10Test method testPublishInfoImmediateTrueConversion.
public void testPublishInfoImmediateTrueConversion() {
final boolean immediate = true;
AMQMessage message = createTestMessage(new BasicContentHeaderProperties());
message.getMessagePublishInfo().setImmediate(immediate);
final MessageTransferMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
final DeliveryProperties deliveryProperties = convertedMessage.getStoredMessage().getMetaData().getDeliveryProperties();
assertEquals("Unexpected immediate flag", immediate, deliveryProperties.getImmediate());
}
Aggregations