use of org.apache.qpid.server.protocol.v1_0.Message_1_0 in project qpid-broker-j by apache.
the class PropertyConverter_0_8_to_1_0Test method testReplyToConversionWhenNonBindingURLFormatIsUsed.
public void testReplyToConversionWhenNonBindingURLFormatIsUsed() {
BasicContentHeaderProperties basicContentHeaderProperties = new BasicContentHeaderProperties();
final String replyTo = "test";
basicContentHeaderProperties.setReplyTo(replyTo);
AMQMessage message = createTestMessage(basicContentHeaderProperties);
final Message_1_0 convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
Properties properties = convertedMessage.getPropertiesSection().getValue();
assertEquals("Unexpected reply-to", "test", properties.getReplyTo());
}
use of org.apache.qpid.server.protocol.v1_0.Message_1_0 in project qpid-broker-j by apache.
the class PropertyConverter_0_8_to_1_0Test method testPersistentDeliveryModeConversion.
public void testPersistentDeliveryModeConversion() {
BasicContentHeaderProperties basicContentHeaderProperties = new BasicContentHeaderProperties();
basicContentHeaderProperties.setDeliveryMode(BasicContentHeaderProperties.PERSISTENT);
AMQMessage message = createTestMessage(basicContentHeaderProperties);
final Message_1_0 convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
Header header = convertedMessage.getHeaderSection().getValue();
assertTrue("Unexpected durable header", header.getDurable());
}
use of org.apache.qpid.server.protocol.v1_0.Message_1_0 in project qpid-broker-j by apache.
the class PropertyConverter_0_8_to_1_0Test method testTypeConversion.
public void testTypeConversion() {
BasicContentHeaderProperties basicContentHeaderProperties = new BasicContentHeaderProperties();
final String type = "test-type";
basicContentHeaderProperties.setType(String.valueOf(type));
AMQMessage message = createTestMessage(basicContentHeaderProperties);
final Message_1_0 convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
Properties properties = convertedMessage.getPropertiesSection().getValue();
assertEquals("Unexpected subject", type, properties.getSubject());
}
use of org.apache.qpid.server.protocol.v1_0.Message_1_0 in project qpid-broker-j by apache.
the class PropertyConverter_0_8_to_1_0Test method testReplyToConversionWhenBindingURLFormatIsUsed4.
public void testReplyToConversionWhenBindingURLFormatIsUsed4() {
BasicContentHeaderProperties basicContentHeaderProperties = new BasicContentHeaderProperties();
final String replyTo = "direct:////?routingkey='test_routing_key'";
basicContentHeaderProperties.setReplyTo(replyTo);
AMQMessage message = createTestMessage(basicContentHeaderProperties);
final Message_1_0 convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
Properties properties = convertedMessage.getPropertiesSection().getValue();
assertEquals("Unexpected reply-to", "test_routing_key", properties.getReplyTo());
}
use of org.apache.qpid.server.protocol.v1_0.Message_1_0 in project qpid-broker-j by apache.
the class PropertyConverter_0_8_to_1_0Test method testReplyToConversionWhenBindingURLFormatIsUsed3.
public void testReplyToConversionWhenBindingURLFormatIsUsed3() {
BasicContentHeaderProperties basicContentHeaderProperties = new BasicContentHeaderProperties();
final String replyTo = "direct:////queue_name";
basicContentHeaderProperties.setReplyTo(replyTo);
AMQMessage message = createTestMessage(basicContentHeaderProperties);
final Message_1_0 convertedMessage = _messageConverter.convert(message, _namedAddressSpace);
Properties properties = convertedMessage.getPropertiesSection().getValue();
assertEquals("Unexpected reply-to", "queue_name", properties.getReplyTo());
}
Aggregations