Author: marnie
Date: Tue Nov 7 04:31:17 2006
New Revision: 472083
URL: http://svn.apache.org/viewvc?view=rev&rev=472083
Log:
Before/After now class level
Modified:
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/client/TestAMQSession.java
Modified:
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/client/TestAMQSession.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/client/TestAMQSession.java?view=diff&rev=472083&r1=472082&r2=472083
==============================================================================
---
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/client/TestAMQSession.java
(original)
+++
incubator/qpid/trunk/qpid/java/client/test/src/org/apache/qpid/client/TestAMQSession.java
Tue Nov 7 04:31:17 2006
@@ -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 @@
*/
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 @@
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 @@
return new JUnit4TestAdapter(TestAMQSession.class);
}
- private void startVmBrokers()
+ private static void startVmBrokers()
{
try
{