You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2008/02/27 06:17:46 UTC
svn commit: r631490 -
/incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java
Author: rajith
Date: Tue Feb 26 21:17:46 2008
New Revision: 631490
URL: http://svn.apache.org/viewvc?rev=631490&view=rev
Log:
added a test case for the multiple binding key case
Modified:
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java
Modified: incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java?rev=631490&r1=631489&r2=631490&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java Tue Feb 26 21:17:46 2008
@@ -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 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 @@
assertTrue(dest.getQueueName().equals("Queue"));
}
- public void testQueue() throws URLSyntaxException
+ public void testQueue() throws URISyntaxException
{
String url = "exchangeClass://exchangeName//Queue";
@@ -58,7 +58,7 @@
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 void testDestination() throws URLSyntaxException
+ public void testDestination() throws URISyntaxException
{
String url = "exchangeClass://exchangeName/Destination/";
@@ -90,7 +90,7 @@
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 @@
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 @@
assertTrue(dest.getOption("option2").equals("value2"));
}
- public void testDestinationWithNoExchangeDefaultsToDirect() throws URLSyntaxException
+ public void testDestinationWithNoExchangeDefaultsToDirect() throws URISyntaxException
{
String url = "IBMPerfQueue1?durable='true'";
@@ -136,6 +136,21 @@
assertTrue(dest.getQueueName().equals("IBMPerfQueue1"));
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()