diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2008-02-27 05:17:46 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2008-02-27 05:17:46 +0000 |
| commit | ba38d82dfdaf089f26ae204326d36190c46fd1c3 (patch) | |
| tree | e6d5684f52f36b6951841ac935aa4dc9c8719294 /qpid/java/client/src | |
| parent | ab1bc9e1480b362f764aaecb4fd66033068b62a8 (diff) | |
| download | qpid-python-ba38d82dfdaf089f26ae204326d36190c46fd1c3.tar.gz | |
added a test case for the multiple binding key case
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@631490 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/src')
| -rw-r--r-- | qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java index 66be1ebc73..3aadd4d99d 100644 --- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java +++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java @@ -7,9 +7,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -24,11 +24,11 @@ import junit.framework.TestCase; import org.apache.qpid.exchange.ExchangeDefaults; import org.apache.qpid.url.AMQBindingURL; -import org.apache.qpid.url.URLSyntaxException; +import java.net.URISyntaxException; public class DestinationURLTest extends TestCase { - public void testFullURL() throws URLSyntaxException + public void testFullURL() throws URISyntaxException { String url = "exchange.Class://exchangeName/Destination/Queue"; @@ -43,7 +43,7 @@ public class DestinationURLTest extends TestCase assertTrue(dest.getQueueName().equals("Queue")); } - public void testQueue() throws URLSyntaxException + public void testQueue() throws URISyntaxException { String url = "exchangeClass://exchangeName//Queue"; @@ -58,7 +58,7 @@ public class DestinationURLTest extends TestCase assertTrue(dest.getQueueName().equals("Queue")); } - public void testQueueWithOption() throws URLSyntaxException + public void testQueueWithOption() throws URISyntaxException { String url = "exchangeClass://exchangeName//Queue?option='value'"; @@ -75,7 +75,7 @@ public class DestinationURLTest extends TestCase } - public void testDestination() throws URLSyntaxException + public void testDestination() throws URISyntaxException { String url = "exchangeClass://exchangeName/Destination/"; @@ -90,7 +90,7 @@ public class DestinationURLTest extends TestCase assertTrue(dest.getQueueName().equals("")); } - public void testDestinationWithOption() throws URLSyntaxException + public void testDestinationWithOption() throws URISyntaxException { String url = "exchangeClass://exchangeName/Destination/?option='value'"; @@ -107,7 +107,7 @@ public class DestinationURLTest extends TestCase assertTrue(dest.getOption("option").equals("value")); } - public void testDestinationWithMultiOption() throws URLSyntaxException + public void testDestinationWithMultiOption() throws URISyntaxException { String url = "exchangeClass://exchangeName/Destination/?option='value',option2='value2'"; @@ -123,7 +123,7 @@ public class DestinationURLTest extends TestCase assertTrue(dest.getOption("option2").equals("value2")); } - public void testDestinationWithNoExchangeDefaultsToDirect() throws URLSyntaxException + public void testDestinationWithNoExchangeDefaultsToDirect() throws URISyntaxException { String url = "IBMPerfQueue1?durable='true'"; @@ -138,6 +138,21 @@ public class DestinationURLTest extends TestCase assertTrue(dest.getOption("durable").equals("true")); } + public void testDestinationWithMultiBindingKeys() throws URISyntaxException + { + + String url = "exchangeClass://exchangeName/Destination/?bindingKey='key1',bindingKey='key2'"; + + AMQBindingURL dest = new AMQBindingURL(url); + + assertTrue(dest.getExchangeClass().equals("exchangeClass")); + assertTrue(dest.getExchangeName().equals("exchangeName")); + assertTrue(dest.getDestinationName().equals("Destination")); + assertTrue(dest.getQueueName().equals("")); + + assertTrue(dest.getBindingKeys().length == 2); + } + public static junit.framework.Test suite() { return new junit.framework.TestSuite(DestinationURLTest.class); |
