diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2013-03-26 21:51:03 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2013-03-26 21:51:03 +0000 |
| commit | 83f7572676acd64993cf1c4692f01731b88963cf (patch) | |
| tree | de25ceeed224d7301c5a0fc36d6826f426bf1af8 /java | |
| parent | 0e7f383dfa335790e16d8181b26d1069df5426b2 (diff) | |
| download | qpid-python-83f7572676acd64993cf1c4692f01731b88963cf.tar.gz | |
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
Diffstat (limited to 'java')
| -rw-r--r-- | java/client/src/test/java/org/apache/qpid/client/AMQDestinationTest.java | 8 |
1 files changed, 6 insertions, 2 deletions
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()); } } |
