cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1130462 - /cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProviderTest.java
Date Thu, 02 Jun 2011 10:12:54 GMT
Author: ningjiang
Date: Thu Jun  2 10:12:54 2011
New Revision: 1130462

URL: http://svn.apache.org/viewvc?rev=1130462&view=rev
Log:
CXF-3567
Fixed the unit test error

Modified:
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProviderTest.java

Modified: cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProviderTest.java?rev=1130462&r1=1130461&r2=1130462&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProviderTest.java
(original)
+++ cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/continuations/JMSContinuationProviderTest.java
Thu Jun  2 10:12:54 2011
@@ -19,16 +19,26 @@
 
 package org.apache.cxf.transport.jms.continuations;
 
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.continuations.Continuation;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
+
+import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Test;
 
 
 public class JMSContinuationProviderTest extends Assert {
+    private static Bus bus = BusFactory.getDefaultBus();
+    
+    @AfterClass
+    public static void cleanUpBus() {
+        BusFactory.setDefaultBus(null);
+    }
 
     @Test
     public void testNoContinuationForOneWay() {
@@ -46,7 +56,7 @@ public class JMSContinuationProviderTest
         Message m = new MessageImpl();
         m.setExchange(new ExchangeImpl());
         JMSContinuationProvider provider = 
-            new JMSContinuationProvider(null, m, null, null, null, null);
+            new JMSContinuationProvider(bus, m, null, null, null, null);
         Continuation cw = provider.getContinuation(); 
         assertTrue(cw.isNew());
         assertSame(cw, m.get(JMSContinuation.class));
@@ -56,7 +66,7 @@ public class JMSContinuationProviderTest
     public void testGetExistingContinuation() {
         Message m = new MessageImpl();
         m.setExchange(new ExchangeImpl());
-        JMSContinuation cw = new JMSContinuation(null, m, null, null, null, null);
+        JMSContinuation cw = new JMSContinuation(bus, m, null, null, null, null);
         m.put(JMSContinuation.class, cw);
         JMSContinuationProvider provider = new JMSContinuationProvider(null, m, null, null,
null, null);
         assertSame(cw, provider.getContinuation());



Mime
View raw message