summaryrefslogtreecommitdiff
path: root/qpid/java/client/src
diff options
context:
space:
mode:
authorArnaud Simon <arnaudsimon@apache.org>2007-10-02 14:18:46 +0000
committerArnaud Simon <arnaudsimon@apache.org>2007-10-02 14:18:46 +0000
commit043f78e0cd23eb751d2032a1bb13a14c58d3c769 (patch)
treeb5014b0556b13a1b3e6a3ed2da2bfa5db7c7b1d2 /qpid/java/client/src
parent61262bb65fe12305f842a59c06cb7cd3666b5cd0 (diff)
downloadqpid-python-043f78e0cd23eb751d2032a1bb13a14c58d3c769.tar.gz
Changed to use QpidTestCase
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@581256 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/basic/InvalidDestinationTest.java35
1 files changed, 4 insertions, 31 deletions
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/InvalidDestinationTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/InvalidDestinationTest.java
index 83846e0081..a3c7b2ea48 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/InvalidDestinationTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/basic/InvalidDestinationTest.java
@@ -22,15 +22,9 @@
package org.apache.qpid.test.unit.basic;
import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQDestination;
-import org.apache.qpid.client.AMQSession;
import org.apache.qpid.client.AMQQueue;
-import org.apache.qpid.client.vmbroker.AMQVMBrokerCreationException;
-import org.apache.qpid.client.transport.TransportConnection;
+import org.apache.qpid.testutil.QpidTestCase;
-import junit.framework.TestCase;
-
-import javax.jms.MessageConsumer;
import javax.jms.Session;
import javax.jms.QueueSession;
import javax.jms.Queue;
@@ -38,39 +32,18 @@ import javax.jms.QueueSender;
import javax.jms.TextMessage;
import javax.jms.InvalidDestinationException;
-public class InvalidDestinationTest extends TestCase
+public class InvalidDestinationTest extends QpidTestCase
{
private AMQConnection _connection;
- private AMQDestination _destination;
- private AMQSession _session;
- private MessageConsumer _consumer;
-
- private static final String VM_BROKER = "vm://:1";
-
protected void setUp() throws Exception
{
super.setUp();
- createVMBroker();
- _connection = new AMQConnection(VM_BROKER, "guest", "guest", "ReceiveTestClient", "test");
- }
-
- public void createVMBroker()
- {
- try
- {
- TransportConnection.createVMBroker(1);
- }
- catch (AMQVMBrokerCreationException e)
- {
- fail("Unable to create broker: " + e);
- }
+ _connection = (AMQConnection) getConnection("guest", "guest");
}
protected void tearDown() throws Exception
{
- _connection.close();
- TransportConnection.killVMBroker(1);
super.tearDown();
}
@@ -83,7 +56,7 @@ public class InvalidDestinationTest extends TestCase
QueueSession queueSession = _connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
// This is the only easy way to create and bind a queue from the API :-(
- MessageConsumer consumer = queueSession.createConsumer(validDestination);
+ queueSession.createConsumer(validDestination);
QueueSender sender = queueSession.createSender(invalidDestination);
TextMessage msg = queueSession.createTextMessage("Hello");