From 332bd04ab0a9f40c9842e4c4f0ab6ac1ee157e4f Mon Sep 17 00:00:00 2001 From: Marnie McCormack Date: Tue, 7 Nov 2006 12:31:17 +0000 Subject: Before/After now class level git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@472083 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/apache/qpid/client/TestAMQSession.java | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'java') diff --git a/java/client/test/src/org/apache/qpid/client/TestAMQSession.java b/java/client/test/src/org/apache/qpid/client/TestAMQSession.java index bae3a4fb08..3f2457f682 100644 --- a/java/client/test/src/org/apache/qpid/client/TestAMQSession.java +++ b/java/client/test/src/org/apache/qpid/client/TestAMQSession.java @@ -17,10 +17,7 @@ */ package org.apache.qpid.client; -import org.junit.Before; -import org.junit.Test; -import org.junit.Assert; -import org.junit.After; +import org.junit.*; import org.apache.qpid.AMQException; import org.apache.qpid.client.transport.TransportConnection; import org.apache.qpid.client.vmbroker.AMQVMBrokerCreationException; @@ -37,12 +34,12 @@ import junit.framework.JUnit4TestAdapter; */ public class TestAMQSession { - private AMQSession _session; - private AMQTopic _topic; - private AMQQueue _queue; + private static AMQSession _session; + private static AMQTopic _topic; + private static AMQQueue _queue; - @Before - public void setUp() throws AMQException, URLSyntaxException, JMSException { + @BeforeClass + public static void setUp() throws AMQException, URLSyntaxException, JMSException { //initialise the variables we need for testing startVmBrokers(); AMQConnection connection = new AMQConnection("vm://:1", "guest", "guest", "fred", "/test"); @@ -87,8 +84,8 @@ public class TestAMQSession { Assert.assertEquals("Queue names should match from QueueReceiver with selector",_queue.getQueueName(),receiver.getQueue().getQueueName()); } - @After - public void stopVmBrokers() + @AfterClass + public static void stopVmBrokers() { TransportConnection.killVMBroker(1); _queue = null; @@ -101,7 +98,7 @@ public class TestAMQSession { return new JUnit4TestAdapter(TestAMQSession.class); } - private void startVmBrokers() + private static void startVmBrokers() { try { -- cgit v1.2.1