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 testDiscardUnroutableFalseConversion.
public void testDiscardUnroutableFalseConversion() {
final boolean discardUnroutable = false;
final DeliveryProperties deliveryProperties = new DeliveryProperties();
deliveryProperties.setDiscardUnroutable(discardUnroutable);
MessageTransferMessage message = createTestMessage(deliveryProperties);
final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
MessagePublishInfo messagePublishInfo = convertedMessage.getMessagePublishInfo();
assertEquals("Unexpected mandatory flag", !discardUnroutable, messagePublishInfo.isMandatory());
}
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 testImmediateFalseConversion.
public void testImmediateFalseConversion() {
final boolean immediate = false;
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 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.DeliveryProperties in project qpid-broker-j by apache.
the class PropertyConverter_0_10_to_0_8Test method testExchangeConversion.
public void testExchangeConversion() {
final String testExchange = "testExchange";
final DeliveryProperties deliveryProperties = new DeliveryProperties();
deliveryProperties.setExchange(testExchange);
MessageTransferMessage message = createTestMessage(deliveryProperties);
final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
MessagePublishInfo messagePublishInfo = convertedMessage.getMessagePublishInfo();
assertEquals("Unexpected exchange", testExchange, messagePublishInfo.getExchange().toString());
}
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 testExpirationConversion.
public void testExpirationConversion() {
long timestamp = System.currentTimeMillis();
int ttl = 100000;
final long expiration = timestamp + ttl;
final DeliveryProperties deliveryProperties = new DeliveryProperties();
deliveryProperties.setExpiration(expiration);
MessageTransferMessage message = createTestMessage(deliveryProperties, new MessageProperties(), null, timestamp);
final AMQMessage convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
BasicContentHeaderProperties properties = convertedMessage.getContentHeaderBody().getProperties();
assertEquals("Unexpected expiration", expiration, properties.getExpiration());
}
Aggregations