add missing test
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/1732a2cd Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/1732a2cd Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/1732a2cd Branch: refs/heads/master Commit: 1732a2cd2125a728ab1479579db8ccefa70f8f4a Parents: 0bcc951 Author: Robert Gemmell <rob...@apache.org> Authored: Wed Oct 1 10:04:40 2014 +0100 Committer: Robert Gemmell <rob...@apache.org> Committed: Wed Oct 1 10:35:56 2014 +0100 ---------------------------------------------------------------------- .../qpid/jms/integration/MessageIntegrationTest.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/1732a2cd/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java ---------------------------------------------------------------------- diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java index cfd7392..ef31e2b 100644 --- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java +++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java @@ -503,13 +503,22 @@ public class MessageIntegrationTest extends QpidJmsTestCase /** * Tests that receiving a message with a ulong typed message-id results in returning the - * expected value for JMSMessageId where the JMS "ID:" prefix has been added to the UUID.tostring() + * expected value for JMSMessageId where the JMS "ID:" prefix has been added to the UnsignedLong.tostring() */ @Test(timeout = 2000) - public void testReceivedMessageWithLongMessageIdReturnsExpectedJMSMessageID() throws Exception { + public void testReceivedMessageWithUnsignedLongMessageIdReturnsExpectedJMSMessageID() throws Exception { receivedMessageWithMessageIdTestImpl(UnsignedLong.valueOf(123456789L)); } + /** + * Tests that receiving a message with a binary typed message-id results in returning the + * expected value for JMSMessageId where the JMS "ID:" prefix has been added to the hex representation of the binary. + */ + @Test(timeout = 2000) + public void testReceivedMessageWithBinaryMessageIdReturnsExpectedJMSMessageID() throws Exception { + receivedMessageWithMessageIdTestImpl(new Binary(new byte[]{(byte)0x02, (byte)0x20, (byte) 0xAE, (byte) 0x00})); + } + private void receivedMessageWithMessageIdTestImpl(Object underlyingAmqpMessageId) throws Exception { try (TestAmqpPeer testPeer = new TestAmqpPeer(IntegrationTestFixture.PORT);) { Connection connection = _testFixture.establishConnecton(testPeer); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org