From 83f7572676acd64993cf1c4692f01731b88963cf Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Tue, 26 Mar 2013 21:51:03 +0000 Subject: QPID-3769 Addressed concerns raised by Alex. Expanded the tests to verify subject equality when determining equality for destinations. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1461329 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/qpid/client/AMQDestinationTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'java') diff --git a/java/client/src/test/java/org/apache/qpid/client/AMQDestinationTest.java b/java/client/src/test/java/org/apache/qpid/client/AMQDestinationTest.java index 1a411c99bc..e034fa5b3f 100644 --- a/java/client/src/test/java/org/apache/qpid/client/AMQDestinationTest.java +++ b/java/client/src/test/java/org/apache/qpid/client/AMQDestinationTest.java @@ -27,10 +27,10 @@ public class AMQDestinationTest extends TestCase public void testEqaulsAndHashCodeForAddressBasedDestinations() throws Exception { AMQDestination dest = new AMQQueue("ADDR:Foo; {node :{type:queue}}"); - AMQDestination dest1 = new AMQQueue("ADDR:Foo; {node :{type:topic}}"); + AMQDestination dest1 = new AMQTopic("ADDR:Foo; {node :{type:topic}}"); AMQDestination dest2 = new AMQQueue( "ADDR:Foo; {create:always,node :{type:queue}}"); - String bUrl = "direct://amq.direct/test-route/Foo?routingkey='Foo'"; + String bUrl = "BURL:direct://amq.direct/test-route/Foo?routingkey='Foo'"; AMQDestination dest3 = new AMQQueue(bUrl); assertTrue(dest.equals(dest)); @@ -42,5 +42,9 @@ public class AMQDestinationTest extends TestCase assertTrue(dest.hashCode() != dest1.hashCode()); assertTrue(dest.hashCode() == dest2.hashCode()); assertTrue(dest.hashCode() != dest3.hashCode()); + + AMQDestination dest4 = new AMQQueue("ADDR:Foo/Bar; {node :{type:queue}}"); + AMQDestination dest5 = new AMQQueue("ADDR:Foo/Bar2; {node :{type:queue}}"); + assertTrue(dest4.hashCode() != dest5.hashCode()); } } -- cgit v1.2.1