cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r546410 [2/3] - in /incubator/cxf/trunk: integration/jbi/src/test/java/org/apache/cxf/jbi/se/ integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ integration/jca/src/test/java/org/apache/cxf/jca/core/classloader/ integration/jca/src/...
Date Tue, 12 Jun 2007 08:08:11 GMT
Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/jarloader/JarLoaderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/jarloader/JarLoaderTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/jarloader/JarLoaderTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/jarloader/JarLoaderTest.java Tue Jun 12 01:08:04 2007
@@ -22,28 +22,24 @@
 import java.util.Map;
 import java.util.logging.Logger;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 
-public class JarLoaderTest extends TestCase {
+
+public class JarLoaderTest extends Assert {
     private static final Logger LOG = Logger.getLogger(JarLoaderTest.class.getName());
     private URL exampleRarURL;
 
-    public JarLoaderTest(String name) {
-        super(name);
-    }
 
-    public static Test suite() {
-        return new TestSuite(JarLoaderTest.class);
-    }
 
+    @Before
     public void setUp() throws Exception {
         exampleRarURL = getClass().getClassLoader().getResource("blackbox-notx.rar");
     }    
         
-
+    @Test
     public void testGetBytesFromImputStream() throws Exception {
         byte[] bytes = JarLoader.getBytesFromInputStream(exampleRarURL
                 .openStream());
@@ -52,6 +48,7 @@
         LOG.fine("bytes length. : " + bytes.length);
     }
 
+    @Test
     public void testGetJarContents() throws Exception {
         String urlPath = exampleRarURL.toString();
         

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/servant/CXFConnectEJBServantTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/servant/CXFConnectEJBServantTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/servant/CXFConnectEJBServantTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/servant/CXFConnectEJBServantTest.java Tue Jun 12 01:08:04 2007
@@ -20,48 +20,43 @@
 
 //import java.lang.reflect.Method;
 
+import java.lang.reflect.Method;
+
 import javax.ejb.EJBObject;
 import javax.naming.InitialContext;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.jca.cxf.JCABusFactory;
 import org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl;
 import org.easymock.classextension.EasyMock;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
 
-public class CXFConnectEJBServantTest extends TestCase { 
+public class CXFConnectEJBServantTest extends Assert { 
   
     protected CXFConnectEJBServant ejbservant;
 
-    public CXFConnectEJBServantTest(String name) throws Exception {
-        super(name);
-    }
-
+    @Before
     public void setUp() throws Exception {
         Bus mockBus = createMockBus();
         ejbservant = createCXFConnectEJBServant(mockBus);
     }
 
+    @After
     public void tearDown() {
     }
 
-    public static Test suite() {
-        return new TestSuite(CXFConnectEJBServantTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.main(new String[]{CXFConnectEJBServantTest.class.getName()});
-    }
-
+    @Test
     public void testConstructor() throws Exception {
         assertTrue("constructor works", 
                    createCXFConnectEJBServant(createMockBus()) instanceof CXFConnectEJBServant);
     }
     
+    @Test
     public void testGetTargetObjectSetsThreadContextClassloader() throws Exception {
         final ClassLoader cl = EasyMock.createMock(ClassLoader.class);
         final EJBObject ejb = EasyMock.createMock(EJBObject.class);
@@ -104,7 +99,8 @@
         EasyMock.verify(rai);
        
     }
-    /*    
+        
+    @Ignore
     public void testServantInvoke() throws Exception { 
 
         Greeter target = new GreeterImpl(); 
@@ -117,8 +113,8 @@
             e.printStackTrace();
         }
     }
-    */
     /*
+    @Ignore
     public void testServantInvokeThrowBusExceptionIfEJBThrowRuntimeException() throws Exception {
         final String msg = "jjljljlj";
         GreeterImpl target = new GreeterImpl();
@@ -137,8 +133,8 @@
             assertTrue("cause is RuntimeException", ex.getCause() instanceof RuntimeException);
             assertTrue("exception message contains " + msg, ex.getMessage().indexOf(msg)!=-1);
         }
-    }
-*/
+    }*/
+
     protected Bus createMockBus() {
         return EasyMock.createMock(Bus.class);
     }

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/servant/ThreadContextCheckerHome.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/servant/ThreadContextCheckerHome.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/servant/ThreadContextCheckerHome.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/servant/ThreadContextCheckerHome.java Tue Jun 12 01:08:04 2007
@@ -26,14 +26,16 @@
 import javax.ejb.HomeHandle;
 import javax.ejb.RemoveException;
 
-import junit.framework.TestCase;
+import org.junit.Assert;
+
+
 
 public class ThreadContextCheckerHome implements EJBHome {
     final Object ejb;
     final ClassLoader cl;
-    final TestCase test;
+    final Assert test;
 
-    public ThreadContextCheckerHome(Object ejbObj, ClassLoader cLoader, TestCase tCase) {
+    public ThreadContextCheckerHome(Object ejbObj, ClassLoader cLoader, Assert tCase) {
         this.ejb = ejbObj;
         this.cl = cLoader;
         this.test = tCase;
@@ -41,7 +43,7 @@
 
     public Object create() throws RemoteException {
         ClassLoader current = Thread.currentThread().getContextClassLoader();
-        TestCase.assertSame("thread context classloader is set as expected, current=" + current,
+        Assert.assertSame("thread context classloader is set as expected, current=" + current,
                             current, cl);
         return ejb;
     }

Modified: incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/InflectorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/InflectorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/InflectorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/InflectorTest.java Tue Jun 12 01:08:04 2007
@@ -36,12 +36,15 @@
  */
 package org.apache.cxf.binding.http;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.binding.http.strategy.EnglishInflector;
 import org.apache.cxf.binding.http.strategy.Inflector;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class InflectorTest extends TestCase {
+public class InflectorTest extends Assert {
+    
+    @Test
     public void testPluralization() {
         Inflector i = new EnglishInflector();
         assertEquals("quizzes", i.pluralize("quiz"));
@@ -51,7 +54,7 @@
         assertEquals("kids", i.pluralize("kid"));
         assertEquals("bashes", i.pluralize("bash"));
     }
-    
+    @Test
     public void testSingularization() {
         Inflector i = new EnglishInflector();
         assertEquals("matrix", i.singularlize("matrices"));

Modified: incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/IriDecoderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/IriDecoderTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/IriDecoderTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/IriDecoderTest.java Tue Jun 12 01:08:04 2007
@@ -20,11 +20,13 @@
 
 import java.util.List;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.binding.http.IriDecoderHelper.Param;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class IriDecoderTest extends TestCase {
+public class IriDecoderTest extends Assert {
+    
+    @Test
     public void testPaths() {
         List<Param> params = IriDecoderHelper.decodeIri("test/123.xml", "test/{id}.xml");
         assertEquals(1, params.size());

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -40,6 +40,8 @@
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
+import org.junit.Before;
+import org.junit.Test;
 
 public class MustUnderstandInterceptorTest extends TestBase {
 
@@ -51,6 +53,7 @@
     private DummySoapInterceptor dsi;
     private ReadHeadersInterceptor rhi;
 
+    @Before
     public void setUp() throws Exception {
 
         super.setUp();
@@ -67,6 +70,7 @@
         chain.add(dsi);
     }
 
+    @Test
     public void testHandleMessageSucc() throws Exception {
         prepareSoapMessage();
         dsi.getUnderstoodHeaders().add(RESERVATION);
@@ -78,6 +82,7 @@
             .isCalledGetUnderstood());
     }
 
+    @Test
     public void testHandleMessageFail() throws Exception {
         prepareSoapMessage();
 
@@ -98,6 +103,7 @@
         }
     }
 
+    @Test
     public void testHandleMessageWithHeaderParam() throws Exception {
         prepareSoapMessage();
         dsi.getUnderstoodHeaders().add(RESERVATION);

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCInInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCInInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCInInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCInInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -36,6 +36,8 @@
 import org.apache.hello_world_rpclit.types.MyComplexStruct;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.Before;
+import org.junit.Test;
 
 public class RPCInInterceptorTest extends TestBase {
 
@@ -45,6 +47,7 @@
 
     private IMocksControl control = EasyMock.createNiceControl();
     
+    @Before
     public void setUp() throws Exception {
         super.setUp();
         ServiceInfo si = getMockedServiceModel(this.getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl")
@@ -71,7 +74,7 @@
         control.replay();
     }
 
-    
+    @Test
     public void testInterceptorRPCLitOutbound() throws Exception {
         RPCInInterceptor interceptor = new RPCInInterceptor();
 
@@ -92,6 +95,7 @@
         assertEquals(45, s.getElem3());
     }
 
+    @Test
     public void testInterceptorRPCLitInbound() throws Exception {
         RPCInInterceptor interceptor = new RPCInInterceptor();
         soapMessage.setContent(XMLStreamReader.class, XMLInputFactory.newInstance().createXMLStreamReader(

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -42,6 +42,9 @@
 import org.apache.hello_world_rpclit.types.MyComplexStruct;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 public class RPCOutInterceptorTest extends TestBase {
 
@@ -53,6 +56,7 @@
 
     private IMocksControl control = EasyMock.createNiceControl();
 
+    @Before
     public void setUp() throws Exception {
         super.setUp();
         ServiceInfo si = getMockedServiceModel(this.getClass().getResource("/wsdl/hello_world_rpc_lit.wsdl")
@@ -84,10 +88,12 @@
         soapMessage.setContent(List.class, param);
     }
 
+    @After
     public void tearDown() throws Exception {
         baos.close();
     }
 
+    @Test
     public void testWriteOutbound() throws Exception {
         RPCOutInterceptor interceptor = new RPCOutInterceptor();
 
@@ -115,6 +121,7 @@
         assertEquals("elem1", reader.getText());
     }
 
+    @Test
     public void testWriteInbound() throws Exception {
         RPCOutInterceptor interceptor = new RPCOutInterceptor();
         soapMessage.setContent(XMLStreamWriter.class, XMLOutputFactory.newInstance().createXMLStreamWriter(

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -38,12 +38,15 @@
 import org.apache.cxf.headers.Header;
 import org.apache.cxf.interceptor.StaxInInterceptor;
 import org.apache.cxf.message.Attachment;
+import org.junit.Before;
+import org.junit.Test;
 
 public class ReadHeaderInterceptorTest extends TestBase {
 
     private ReadHeadersInterceptor rhi;
     private StaxInInterceptor staxIntc = new StaxInInterceptor();
 
+    @Before
     public void setUp() throws Exception {
         super.setUp();
 
@@ -51,6 +54,7 @@
         chain.add(rhi);
     }
 
+    @Test
     public void testBadSOAPEnvelopeNamespace() throws Exception {
         soapMessage = TestUtil.createEmptySoapMessage(Soap12.getInstance(), chain);
         InputStream in = getClass().getResourceAsStream("test-bad-env.xml");
@@ -67,6 +71,7 @@
         }
     }
 
+    @Test
     public void testHandleHeader() {
         try {
             prepareSoapMessage("test-soap-header.xml");

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ServiceModelUtilTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ServiceModelUtilTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ServiceModelUtilTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ServiceModelUtilTest.java Tue Jun 12 01:08:04 2007
@@ -26,7 +26,6 @@
 import javax.wsdl.xml.WSDLReader;
 import javax.xml.namespace.QName;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.BindingFactoryManager;
@@ -42,10 +41,14 @@
 import org.apache.cxf.wsdl11.WSDLServiceBuilder;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 import static org.easymock.EasyMock.expect;
 
-public class ServiceModelUtilTest extends TestCase {
+public class ServiceModelUtilTest extends Assert {
     private static final String WSDL_PATH = "test-soap-header.wsdl";
     private Definition def;
     private Service service;
@@ -55,6 +58,7 @@
     private Bus bus;
     private BindingFactoryManager bindingFactoryManager;
     
+    @Before
     public void setUp() throws Exception {
         String wsdlUrl = getClass().getResource(WSDL_PATH).toString();
         WSDLFactory wsdlFactory = WSDLFactory.newInstance();
@@ -84,10 +88,12 @@
         serviceInfo = wsdlServiceBuilder.buildServices(def, service).get(0);
     }
     
+    @After
     public void tearDown() throws Exception {
         
     }
     
+    @Test
     public void testGetSchema() throws Exception {
         BindingInfo bindingInfo = null;
         bindingInfo = serviceInfo.getBindings().iterator().next();

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -22,16 +22,18 @@
 import java.util.List;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.binding.soap.interceptor.SoapActionInterceptor;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class SoapActionInterceptorTest extends TestCase {
+public class SoapActionInterceptorTest extends Assert {
 
+    
+    @Test
     public void testSoapAction() throws Exception {
         Message message = new MessageImpl();
         message.setExchange(new ExchangeImpl());

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java Tue Jun 12 01:08:04 2007
@@ -29,8 +29,6 @@
 
 import org.xml.sax.InputSource;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.binding.BindingFactoryManager;
@@ -48,14 +46,18 @@
 import org.apache.cxf.wsdl.WSDLConstants;
 import org.apache.cxf.wsdl11.WSDLServiceBuilder;
 import org.easymock.IMocksControl;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.expectLastCall;
 import static org.easymock.classextension.EasyMock.createNiceControl;
 
-public class SoapBindingFactoryTest extends TestCase {
+public class SoapBindingFactoryTest extends Assert {
     IMocksControl control;
     
+    @Before
     public void setUp() {
         control = createNiceControl();
     }
@@ -71,6 +73,7 @@
         return bfm;
     }
 
+    @Test
     public void testFactory() throws Exception {        
         Definition d = createDefinition("/wsdl/hello_world.wsdl");
 
@@ -117,6 +120,7 @@
     }
     
     
+    @Test
     public void testSoap12Factory() throws Exception {        
         Definition d = createDefinition("/wsdl/hello_world_soap12.wsdl");
 

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingTest.java Tue Jun 12 01:08:04 2007
@@ -19,13 +19,15 @@
 
 package org.apache.cxf.binding.soap;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class SoapBindingTest extends TestCase {
+public class SoapBindingTest extends Assert {
     
+    @Test
     public void testCreateMessage() throws Exception {
         Message message = new MessageImpl();
         SoapBinding sb = new SoapBinding(null);

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapDestinationFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapDestinationFactoryTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapDestinationFactoryTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapDestinationFactoryTest.java Tue Jun 12 01:08:04 2007
@@ -21,7 +21,6 @@
 
 import javax.wsdl.extensions.soap.SOAPAddress;
 
-import junit.framework.TestCase;
 
 import com.ibm.wsdl.extensions.soap.SOAPAddressImpl;
 
@@ -34,8 +33,12 @@
 import org.apache.cxf.transport.DestinationFactoryManager;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class SoapDestinationFactoryTest extends TestCase {
+public class SoapDestinationFactoryTest extends Assert {
+    
+    @Test
     public void testDestination() throws Exception {
         String wsdlSoapNs = "http://schemas.xmlsoap.org/wsdl/soap/";
         String transportURI = "http://foo/transport";

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -33,11 +33,14 @@
 import org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor;
 import org.apache.cxf.interceptor.StaxInInterceptor;
 import org.apache.cxf.staxutils.StaxUtils;
+import org.junit.Before;
+import org.junit.Test;
 
 public class SoapOutInterceptorTest extends TestBase {
     private ReadHeadersInterceptor rhi;
     private SoapOutInterceptor soi;
 
+    @Before
     public void setUp() throws Exception {
         super.setUp();
         StaxInInterceptor sii = new StaxInInterceptor("phase1");
@@ -50,6 +53,7 @@
         chain.add(soi);
     }
 
+    @Test
     public void testHandleMessage() throws Exception {
         prepareSoapMessage();
 

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestBase.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestBase.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestBase.java Tue Jun 12 01:08:04 2007
@@ -34,7 +34,6 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.BindingFactoryManager;
@@ -47,15 +46,19 @@
 import org.apache.cxf.wsdl11.WSDLServiceBuilder;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
 
-public class TestBase extends TestCase {
+public class TestBase extends Assert {
 
     protected PhaseInterceptorChain chain;
     protected SoapMessage soapMessage;
 
     
     
-    
+
+    @Before
     public void setUp() throws Exception {
         SortedSet<Phase> phases = new TreeSet<Phase>();
         Phase phase1 = new Phase("phase1", 1);
@@ -71,6 +74,7 @@
         soapMessage = TestUtil.createEmptySoapMessage(Soap11.getInstance(), chain);
     }
 
+    @After
     public void tearDown() throws Exception {
     }
 

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -37,6 +37,8 @@
 import org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor;
 import org.apache.cxf.headers.Header;
 import org.apache.cxf.interceptor.StaxInInterceptor;
+import org.junit.Before;
+import org.junit.Test;
 
 
 public class SAAJInInterceptorTest extends TestBase {
@@ -45,6 +47,7 @@
     private StaxInInterceptor staxIntc = new StaxInInterceptor();
     private SAAJInInterceptor saajIntc;
 
+    @Before
     public void setUp() throws Exception {
         super.setUp();
 
@@ -56,6 +59,7 @@
 
     }
 
+    @Test
     public void testHandleHeader() {
         try {
             prepareSoapMessage("../test-soap-header.xml");

Modified: incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/XMLBindingFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/XMLBindingFactoryTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/XMLBindingFactoryTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/XMLBindingFactoryTest.java Tue Jun 12 01:08:04 2007
@@ -19,15 +19,16 @@
 
 package org.apache.cxf.binding.xml;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.binding.Binding;
 import org.apache.cxf.interceptor.AttachmentInInterceptor;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.service.model.BindingInfo;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class XMLBindingFactoryTest extends TestCase {
+public class XMLBindingFactoryTest extends Assert {
     
+    @Test
     public void testContainsInAttachmentInterceptor() {
         XMLBindingFactory xbf = new XMLBindingFactory();
         Binding b = xbf.createBinding(new BindingInfo(null, null));

Modified: incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/TestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/TestBase.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/TestBase.java (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/TestBase.java Tue Jun 12 01:08:04 2007
@@ -30,8 +30,6 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.Binding;
 import org.apache.cxf.binding.BindingFactoryManager;
@@ -54,8 +52,11 @@
 import org.apache.cxf.wsdl11.WSDLServiceFactory;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
 
-public class TestBase extends TestCase {
+public class TestBase extends Assert {
 
     protected PhaseInterceptorChain chain;
 
@@ -67,6 +68,7 @@
     
     protected ServiceInfo serviceInfo;
     
+    @Before
     public void setUp() throws Exception {
         SortedSet<Phase> phases = new TreeSet<Phase>();
         Phase phase1 = new Phase("phase1", 1);
@@ -84,6 +86,7 @@
         xmlMessage = messageImpl;
     }
 
+    @After
     public void tearDown() throws Exception {
     }
 

Modified: incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLFaultInterceptorsTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLFaultInterceptorsTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLFaultInterceptorsTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLFaultInterceptorsTest.java Tue Jun 12 01:08:04 2007
@@ -35,9 +35,11 @@
 import org.apache.cxf.message.Message;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.hello_world_xml_http.bare.types.MyComplexStructType;
+import org.junit.Test;
 
 public class XMLFaultInterceptorsTest extends TestBase {
 
+    @Test
     public void testRuntimeExceptionOfImpl() throws Exception {
 
         String ns = "http://apache.org/hello_world_xml_http/wrapped";

Modified: incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLFaultOutInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLFaultOutInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLFaultOutInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLFaultOutInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -38,15 +38,19 @@
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.hello_world_doc_lit.PingMeFault;
 import org.apache.hello_world_doc_lit.types.FaultDetail;
+import org.junit.Before;
+import org.junit.Test;
 
 public class XMLFaultOutInterceptorTest extends TestBase {
 
     XMLFaultOutInterceptor out = new XMLFaultOutInterceptor();
 
+    @Before
     public void setUp() throws Exception {
         super.setUp();
     }
 
+    @Test
     public void testFault() throws Exception {
         FaultDetail detail = new FaultDetail();
         detail.setMajor((short)2);

Modified: incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -30,17 +30,21 @@
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.hello_world_xml_http.bare.types.MyComplexStructType;
 import org.apache.hello_world_xml_http.wrapped.types.GreetMe;
+import org.junit.Before;
+import org.junit.Test;
 
 public class XMLMessageInInterceptorTest extends TestBase {
 
     XMLMessageInInterceptor in = new XMLMessageInInterceptor("phase1");
     DocLiteralInInterceptor docLitIn = new DocLiteralInInterceptor();
 
+    @Before
     public void setUp() throws Exception {
         super.setUp();
         chain.add(in);
     }
 
+    @Test
     public void testHandleMessageOnBareMultiParam() throws Exception {
         String ns = "http://apache.org/hello_world_xml_http/bare";
         prepareMessage("/message-bare-multi-param.xml");
@@ -61,6 +65,7 @@
         assertEquals("method input in1 is String tli", true, ((String) list.get(1)).indexOf("tli") >= 0);
     }
 
+    @Test
     public void testHandleMessageOnBareSingleChild() throws Exception {
         String ns = "http://apache.org/hello_world_xml_http/bare";
         prepareMessage("/message-bare-single-param-element.xml");
@@ -77,6 +82,7 @@
         assertEquals("method input me is String tli", true, ((String) list.get(0)).indexOf("tli") >= 0);
     }
 
+    @Test
     public void testHandleMessageWrapped() throws Exception {
         String ns = "http://apache.org/hello_world_xml_http/wrapped";
         prepareMessage("/message-wrap.xml");

Modified: incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -37,6 +37,8 @@
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.hello_world_xml_http.bare.types.MyComplexStructType;
 import org.apache.hello_world_xml_http.wrapped.types.GreetMe;
+import org.junit.Before;
+import org.junit.Test;
 
 public class XMLMessageOutInterceptorTest extends TestBase {
 
@@ -66,12 +68,14 @@
 
     QName wrapRequestTypeQName = new QName(wrapNsType, "requestType");
 
+    @Before
     public void setUp() throws Exception {
         super.setUp();
         chain.add(out);
         prepareMessage(params);
     }
    
+    @Test
     public void testBareOutSingle() throws Exception {
 
         MyComplexStructType myComplexStruct = new MyComplexStructType();
@@ -100,6 +104,7 @@
         assertEquals(myComplexStruct.getElem1(), dxr.getText());
     }
 
+    @Test
     public void testBareOutMultiWithRoot() throws Exception {
 
         MyComplexStructType myComplexStruct = new MyComplexStructType();
@@ -147,6 +152,7 @@
         }
     }
 
+    @Test
     public void testWrapOut() throws Exception {
         GreetMe greetMe = new GreetMe();
         greetMe.setRequestType("tli");

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -30,7 +30,6 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
@@ -57,12 +56,15 @@
 import org.apache.hello_world_soap_http.types.GreetMe;
 import org.apache.hello_world_soap_http.types.GreetMeResponse;
 import org.easymock.classextension.IMocksControl;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 
 import static org.easymock.EasyMock.expect;
 import static org.easymock.classextension.EasyMock.createNiceControl;
 
-public class BareInInterceptorTest extends TestCase {
+public class BareInInterceptorTest extends Assert {
     
     PhaseInterceptorChain chain;
     MessageImpl message;
@@ -74,6 +76,7 @@
     EndpointImpl endpoint;
     BindingOperationInfo operation;
     
+    @Before
     public void setUp() throws Exception {
         bus = BusFactory.newInstance().createBus();
 
@@ -90,6 +93,7 @@
     
     }
     
+    @Test
     public void testInterceptorInbound() throws Exception {
         setUpUsingHelloWorld();
 
@@ -112,6 +116,7 @@
         assertEquals("TestSOAPInputPMessage", greet.getRequestType());        
     }
 
+    @Test
     public void testInterceptorInbound1() throws Exception {
         setUpUsingDocLit();
 
@@ -135,6 +140,7 @@
         assertEquals("CXF", greet.getTickerSymbol());        
     }
     
+    @Test
     public void testInterceptorInboundBareNoParameter() throws Exception {
         setUpUsingDocLit();
         
@@ -158,6 +164,7 @@
         assertNull(parameters);
     }
     
+    @Test
     public void testInterceptorOutbound() throws Exception {
         setUpUsingHelloWorld();
 

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareOutInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareOutInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareOutInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareOutInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -38,6 +38,9 @@
 import org.apache.hello_world_soap_http.types.GreetMeResponse;
 import org.easymock.IMocksControl;
 import org.easymock.classextension.EasyMock;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 
 public class BareOutInterceptorTest extends TestBase {
@@ -47,6 +50,7 @@
     private ByteArrayOutputStream baos;
     private XMLStreamWriter writer;
     
+    @Before
     public void setUp() throws Exception {
         super.setUp();
         
@@ -61,10 +65,12 @@
         control.replay();
     }
 
+    @After
     public void tearDown() throws Exception {
         baos.close();
     }
 
+    @Test
     public void testWriteOutbound() throws Exception {
         GreetMeResponse greetMe = new GreetMeResponse();
         greetMe.setResponseType("responseType");
@@ -91,6 +97,7 @@
                      reader.getName());
     }
 
+    @Test
     public void testWriteInbound() throws Exception {
         GreetMe greetMe = new GreetMe();
         greetMe.setRequestType("requestType");

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DocLiteralInInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DocLiteralInInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DocLiteralInInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DocLiteralInInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -30,7 +30,6 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
@@ -57,11 +56,14 @@
 import org.apache.hello_world_soap_http.types.GreetMe;
 import org.apache.hello_world_soap_http.types.GreetMeResponse;
 import org.easymock.classextension.IMocksControl;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 import static org.easymock.EasyMock.expect;
 import static org.easymock.classextension.EasyMock.createNiceControl;
 
-public class DocLiteralInInterceptorTest extends TestCase {
+public class DocLiteralInInterceptorTest extends Assert {
     PhaseInterceptorChain chain;
     MessageImpl message;
     Bus bus;
@@ -72,6 +74,7 @@
     EndpointImpl endpoint;
     BindingOperationInfo operation;
 
+    @Before
     public void setUp() throws Exception {
         bus = BusFactory.newInstance().createBus();
 
@@ -87,6 +90,7 @@
         bfm.registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bf);
     }
 
+    @Test
     public void testInterceptorInboundWrapped() throws Exception {
         setUpUsingHelloWorld();
 
@@ -114,6 +118,7 @@
         assertEquals("TestSOAPInputPMessage", greet.getRequestType());
     }
 
+    @Test
     public void testInterceptorInboundBare() throws Exception {
         setUpUsingDocLit();
 
@@ -140,6 +145,7 @@
         assertEquals("CXF", greet.getTickerSymbol());
     }
 
+    @Test
     public void testInterceptorInboundBareNoParameter() throws Exception {
         setUpUsingDocLit();
 

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBDataBindingTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBDataBindingTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBDataBindingTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBDataBindingTest.java Tue Jun 12 01:08:04 2007
@@ -38,7 +38,6 @@
 
 import org.w3c.dom.Node;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.BindingFactoryManager;
@@ -57,8 +56,12 @@
 import org.apache.cxf.wsdl11.WSDLServiceBuilder;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class JAXBDataBindingTest extends TestCase {
+public class JAXBDataBindingTest extends Assert {
 
     private static final Logger LOG = Logger.getLogger(JAXBDataBindingTest.class.getName());
     private static final String WSDL_PATH = "/wsdl/hello_world.wsdl";
@@ -75,6 +78,7 @@
     private Map<String, SchemaInfo> schemaMap;
     private DestinationFactoryManager destinationFactoryManager;
 
+    @Before
     public void setUp() throws Exception {
         jaxbDataBinding = new JAXBDataBinding();
         String wsdlUrl = getClass().getResource(WSDL_PATH).toString();
@@ -116,10 +120,12 @@
         schemaMap = jaxbDataBinding.getSchemas(serviceInfo);
     }
 
+    @After
     public void tearDown() throws Exception {
 
     }
 
+    @Test
     public void testGetSchemas() throws Exception {
         assertEquals(schemaMap.size(), 2);
         assertTrue(schemaMap.containsKey("http://schemas.xmlsoap.org/wsdl/"));
@@ -132,6 +138,7 @@
         assertEquals(jmsSchema.getNamespaceURI(), "http://cxf.apache.org/transports/jms");
     }
     
+    @Test
     public void testCreateJAXBContext() throws Exception {
         try {
             Set<Class<?>> classes = new HashSet<Class<?>>();
@@ -142,6 +149,7 @@
         }
         
     }
+    @Test
     public void testCreateReader() {
         DataReader reader = jaxbDataBinding.createReader(XMLStreamReader.class);
         assertTrue(reader instanceof XMLStreamDataReader);
@@ -156,6 +164,7 @@
         assertNull(reader);
     }
 
+    @Test
     public void testSupportedFormats() {
         List<Class<?>> cls = Arrays.asList(jaxbDataBinding.getSupportedWriterFormats());
         assertNotNull(cls);
@@ -172,6 +181,7 @@
         assertTrue(cls.contains(Node.class));
     }
 
+    @Test
     public void testCreateWriter() {
         DataWriter writer = jaxbDataBinding.createWriter(XMLStreamWriter.class);
         assertTrue(writer instanceof XMLStreamDataWriter);
@@ -186,6 +196,7 @@
         assertNull(writer);
     }
     
+    @Test
     public void testExtraClass() {
         Class[] extraClass = new Class[] {java.rmi.Remote.class, java.rmi.RemoteException.class};
         jaxbDataBinding.setExtraClass(extraClass);

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java Tue Jun 12 01:08:04 2007
@@ -44,8 +44,6 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.jaxb_misc.Base64WithDefaultValueType;
@@ -58,12 +56,15 @@
 import org.apache.hello_world_soap_http.types.GreetMeResponse;
 import org.apache.hello_world_soap_http.types.StringStruct;
 import org.apache.type_test.doc.TypeTestPortType;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * JAXBEncoderDecoderTest
  * @author apaibir
  */
-public class JAXBEncoderDecoderTest extends TestCase {
+public class JAXBEncoderDecoderTest extends Assert {
     public static final QName  SOAP_ENV = 
             new QName("http://schemas.xmlsoap.org/soap/envelope/", "Envelope");
     public static final QName  SOAP_BODY = 
@@ -73,17 +74,16 @@
     JAXBContext context;
     Schema schema;
     
-    public JAXBEncoderDecoderTest(String arg0) {
-        super(arg0);
+    public JAXBEncoderDecoderTest() {
     }
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(JAXBEncoderDecoderTest.class);
+    
+    public JAXBEncoderDecoderTest(String arg0) {
     }
 
-    protected void setUp() throws Exception {
-        super.setUp();
-
+    @Before
+    public void setUp() throws Exception {
+        
         context = JAXBContext.newInstance(new Class[] {
             GreetMe.class,
             GreetMeResponse.class,
@@ -100,6 +100,7 @@
         assertNotNull(schema);
     }
 
+    @Test
     public void testMarshallIntoDOM() throws Exception {
         String str = new String("Hello");
         QName inCorrectElName = new QName("http://test_jaxb_marshall", "requestType");
@@ -152,6 +153,7 @@
         }
     }
 
+    @Test
     public void testMarshallIntoStax() throws Exception {
         GreetMe obj = new GreetMe();
         obj.setRequestType("Hello");
@@ -188,6 +190,7 @@
                      ((GreetMe)val).getRequestType());
     }
 
+    @Test
     public void testUnmarshallFromStax() throws Exception {
         QName elName = new QName(wrapperAnnotation.targetNamespace(),
                                  wrapperAnnotation.localName());
@@ -214,6 +217,7 @@
         is.close();
     }
     
+    @Test
     public void testMarshalRPCLit() throws Exception {
         QName elName = new QName("http://test_jaxb_marshall", "in");
         MessagePartInfo part = new MessagePartInfo(elName, null);
@@ -231,6 +235,7 @@
     }
 
     
+    @Test
     public void testUnMarshall() throws Exception {
         //Hello World Wsdl generated namespace
         QName elName = new QName(wrapperAnnotation.targetNamespace(),
@@ -303,6 +308,7 @@
         }
     }
 
+    @Test
     public void testUnmarshallWithoutClzInfo() throws Exception {
         QName elName = new QName(wrapperAnnotation.targetNamespace(),
                                  wrapperAnnotation.localName());
@@ -320,6 +326,7 @@
         assertEquals("Hello Test", ((GreetMe)obj).getRequestType());
     }
 
+    @Test
     public void testMarshallWithoutQNameInfo() throws Exception {
         GreetMe obj = new GreetMe();
         obj.setRequestType("Hello");
@@ -351,6 +358,7 @@
                      ((GreetMe)val).getRequestType());
     }
     
+    @Test
     public void testGetClassFromType() throws Exception {
         Method testByte = TestUtil.getMethod(TypeTestPortType.class, "testByte");
         Type[] genericParameterTypes = testByte.getGenericParameterTypes();
@@ -374,7 +382,8 @@
             idx++;
         }
     }
-    
+ 
+    @Test
     public void testDefaultValueConverter() throws Exception {
         Base64WithDefaultValueType testData = (new ObjectFactory()).createBase64WithDefaultValueType();
         byte[] checkValue = testData.getAttributeWithDefaultValue();

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/TestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/TestBase.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/TestBase.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/TestBase.java Tue Jun 12 01:08:04 2007
@@ -29,7 +29,6 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
@@ -53,11 +52,14 @@
 import org.apache.hello_world_soap_http.types.GreetMe;
 import org.apache.hello_world_soap_http.types.GreetMeResponse;
 import org.easymock.classextension.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
 
 import static org.easymock.EasyMock.expect;
 import static org.easymock.classextension.EasyMock.createNiceControl;
 
-public class TestBase extends TestCase {
+public class TestBase extends Assert {
 
     PhaseInterceptorChain chain;
     MessageImpl message;
@@ -69,6 +71,7 @@
     EndpointImpl endpoint;
     BindingOperationInfo operation;
 
+    @Before
     public void setUp() throws Exception {
         bus = BusFactory.newInstance().createBus();
 
@@ -112,6 +115,7 @@
         exchange.put(Binding.class, endpoint.getBinding());
     }
 
+    @After
     public void tearDown() throws Exception {
     }
 

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/WrappedInInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/WrappedInInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/WrappedInInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/WrappedInInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -27,9 +27,11 @@
 import org.apache.cxf.interceptor.WrappedInInterceptor;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.service.model.BindingOperationInfo;
+import org.junit.Test;
 
 public class WrappedInInterceptorTest extends TestBase {
-
+    
+    @Test
     public void testInterceptorInbound() throws Exception {
         WrappedInInterceptor interceptor = new WrappedInInterceptor();
 
@@ -53,6 +55,7 @@
         assertEquals("TestSOAPInputPMessage", gm.getRequestType());
     }
 
+    @Test
     public void testInterceptorOutbound() throws Exception {
         WrappedInInterceptor interceptor = new WrappedInInterceptor();
 

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/io/XMLStreamDataReaderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/io/XMLStreamDataReaderTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/io/XMLStreamDataReaderTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/io/XMLStreamDataReaderTest.java Tue Jun 12 01:08:04 2007
@@ -27,8 +27,6 @@
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamReader;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.jaxb.JAXBDataBinding;
 import org.apache.cxf.service.model.MessagePartInfo;
@@ -37,21 +35,28 @@
 import org.apache.hello_world_rpclit.types.MyComplexStruct;
 import org.apache.hello_world_soap_http.types.GreetMe;
 import org.apache.hello_world_soap_http.types.GreetMeResponse;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
  
-public class XMLStreamDataReaderTest extends TestCase {
+public class XMLStreamDataReaderTest extends Assert {
 
     private XMLInputFactory factory;
     private XMLStreamReader reader;
     private InputStream is;
     
+    @Before
     public void setUp() throws Exception {
         factory = XMLInputFactory.newInstance();
     }
 
+    @After
     public void tearDown() throws IOException {
         is.close();
     }
 
+    @Test
     public void testReadWrapper() throws Exception {
         JAXBDataBinding db = getDataBinding(GreetMe.class);
         
@@ -66,6 +71,7 @@
         assertEquals("TestSOAPInputPMessage", ((GreetMe)val).getRequestType());
     }
 
+    @Test
     public void testReadWrapperReturn() throws Exception {
         JAXBDataBinding db = getDataBinding(GreetMeResponse.class);
 
@@ -82,6 +88,7 @@
         assertEquals("TestSOAPOutputPMessage", ((GreetMeResponse)retValue).getResponseType());
     }
 
+    @Test
     public void testReadRPC() throws Exception {
         JAXBDataBinding db = getDataBinding(MyComplexStruct.class);
 
@@ -106,6 +113,7 @@
     }
 
 
+    @Test
     public void testReadBare() throws Exception {
         JAXBDataBinding db = getDataBinding(TradePriceData.class);
 

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/io/XMLStreamDataWriterTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/io/XMLStreamDataWriterTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/io/XMLStreamDataWriterTest.java (original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/io/XMLStreamDataWriterTest.java Tue Jun 12 01:08:04 2007
@@ -29,8 +29,6 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.databinding.DataWriter;
 import org.apache.cxf.jaxb.JAXBDataBinding;
 import org.apache.cxf.service.model.MessagePartInfo;
@@ -40,13 +38,18 @@
 import org.apache.hello_world_rpclit.types.MyComplexStruct;
 import org.apache.hello_world_soap_http.types.GreetMe;
 import org.apache.hello_world_soap_http.types.GreetMeResponse;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class XMLStreamDataWriterTest extends TestCase {
+public class XMLStreamDataWriterTest extends Assert {
 
     private ByteArrayOutputStream baos;
     private XMLStreamWriter streamWriter;
     private XMLInputFactory inFactory;
 
+    @Before
     public void setUp() throws Exception {
         baos =  new ByteArrayOutputStream();
         XMLOutputFactory factory = XMLOutputFactory.newInstance();
@@ -55,10 +58,12 @@
         inFactory = XMLInputFactory.newInstance();
     }
 
+    @After
     public void tearDown() throws Exception {
         baos.close();
     }
 
+    @Test
     public void testWriteRPCLit1() throws Exception {
         JAXBDataBinding db = getTestWriterFactory();
         
@@ -86,6 +91,7 @@
         assertEquals("TESTOUTPUTMESSAGE", reader.getText());
     }
 
+    @Test
     public void testWriteRPCLit2() throws Exception {
         JAXBDataBinding db = getTestWriterFactory(MyComplexStruct.class);
         
@@ -123,6 +129,7 @@
         assertEquals("This is element 1", reader.getText());
     }
 
+    @Test
     public void testWriteBare() throws Exception {
         JAXBDataBinding db = getTestWriterFactory(TradePriceData.class);
         
@@ -157,6 +164,7 @@
         assertEquals("This is a symbol", reader.getText());
     }
     
+    @Test
     public void testWriteWrapper() throws Exception {
         JAXBDataBinding db = getTestWriterFactory(GreetMe.class);
         
@@ -186,6 +194,7 @@
         assertEquals("Hello", reader.getText());
     }
 
+    @Test
     public void testWriteWrapperReturn() throws Exception {
         JAXBDataBinding db = getTestWriterFactory(GreetMeResponse.class);
         

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/context/WebServiceContextImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/context/WebServiceContextImplTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/context/WebServiceContextImplTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/context/WebServiceContextImplTest.java Tue Jun 12 01:08:04 2007
@@ -23,16 +23,20 @@
 
 import javax.xml.ws.handler.MessageContext;
 
-import junit.framework.TestCase;
 import org.apache.cxf.message.MessageImpl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
 
 
-public class WebServiceContextImplTest extends TestCase {
+public class WebServiceContextImplTest extends Assert {
 
+    @After
     public void tearDown() { 
         WebServiceContextImpl.clear();
     } 
 
+    @Test
     public void testConstructor() { 
         MessageImpl msg = new MessageImpl();
         WrappedMessageContext msgCtx = new WrappedMessageContext(msg); 
@@ -40,6 +44,7 @@
         assertSame(msgCtx, ctx.getMessageContext());
     }     
 
+    @Test
     public void testGetSetMessageContext() { 
         WebServiceContextImpl wsci = new WebServiceContextImpl(); 
         assertNull(wsci.getMessageContext());

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -23,18 +23,21 @@
 import javax.xml.ws.handler.Handler;
 import javax.xml.ws.handler.MessageContext;
 
-import junit.framework.TestCase;
 import org.apache.cxf.message.AbstractWrappedMessage;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.easymock.classextension.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 import static org.easymock.EasyMock.eq;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.isA;
 import static org.easymock.classextension.EasyMock.createNiceControl;
 
-public class AbstractProtocolHandlerInterceptorTest extends TestCase {
+public class AbstractProtocolHandlerInterceptorTest extends Assert {
     
     private IMocksControl control;
     private Binding binding;
@@ -42,6 +45,7 @@
     private IIOPMessage message;
     private Exchange exchange;
     
+    @Before
     public void setUp() {
         control = createNiceControl();
         invoker = control.createMock(HandlerChainInvoker.class);
@@ -50,10 +54,12 @@
         
     }
     
+    @After
     public void tearDown() {
         control.verify();
     }
 
+    @Test
     public void testInterceptSuccess() {
         expect(message.getExchange()).andReturn(exchange).anyTimes();
         expect(exchange.get(HandlerChainInvoker.class)).andReturn(invoker).anyTimes();
@@ -67,6 +73,7 @@
         pi.handleMessage(message);
     }
 
+    @Test
     public void testInterceptFailure() {
         expect(message.getExchange()).andReturn(exchange).anyTimes();
         expect(exchange.get(HandlerChainInvoker.class)).andReturn(invoker).anyTimes();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilderTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilderTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilderTest.java Tue Jun 12 01:08:04 2007
@@ -29,13 +29,18 @@
 import javax.xml.ws.handler.LogicalHandler;
 import javax.xml.ws.handler.MessageContext;
 
-import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class AnnotationHandlerChainBuilderTest extends TestCase {
 
+public class AnnotationHandlerChainBuilderTest extends Assert {
+
+    @Before
     public void setUp() {
     }
 
+    @Test
     public void testFindHandlerChainAnnotation() {
         HandlerTestImpl handlerTestImpl = new HandlerTestImpl();
         AnnotationHandlerChainBuilder chainBuilder = new AnnotationHandlerChainBuilder();
@@ -49,6 +54,7 @@
         assertEquals(TestProtocolHandler.class, handlers.get(4).getClass());
     }    
     
+    @Test
     public void testFindHandlerChainAnnotationPerPort() {
         HandlerTestImpl handlerTestImpl = new HandlerTestImpl();
         AnnotationHandlerChainBuilder chainBuilder = new AnnotationHandlerChainBuilder();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainBuilderTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainBuilderTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainBuilderTest.java Tue Jun 12 01:08:04 2007
@@ -28,15 +28,16 @@
 import javax.xml.ws.handler.LogicalHandler;
 import javax.xml.ws.handler.MessageContext;
 
-import junit.framework.TestCase;
 import org.apache.cxf.Bus;
 import org.apache.cxf.jaxws.javaee.FullyQualifiedClassType;
 import org.apache.cxf.jaxws.javaee.HandlerChainType;
 import org.apache.cxf.jaxws.javaee.ParamValueType;
 import org.apache.cxf.jaxws.javaee.PortComponentHandlerType;
 import org.easymock.classextension.EasyMock;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class HandlerChainBuilderTest extends TestCase {
+public class HandlerChainBuilderTest extends Assert {
 
     Handler[] allHandlers = {EasyMock.createMock(LogicalHandler.class), EasyMock.createMock(Handler.class),
                              EasyMock.createMock(Handler.class), EasyMock.createMock(LogicalHandler.class)};
@@ -46,6 +47,7 @@
     HandlerChainBuilder builder = new HandlerChainBuilder(EasyMock.createNiceMock(Bus.class));
 
 
+    @Test
     public void testChainSorting() {
         List<Handler> sortedHandlerChain = builder.sortHandlers(Arrays.asList(allHandlers));
         assertSame(logicalHandlers[0], sortedHandlerChain.get(0));
@@ -54,6 +56,7 @@
         assertSame(protocolHandlers[1], sortedHandlerChain.get(3));
     }
 
+    @Test
     public void testBuildHandlerChainFromConfiguration() {
 
         HandlerChainType hc = createHandlerChainType();
@@ -71,6 +74,7 @@
         assertNull(tlh.config);
     }
 
+    @Test
     public void testBuilderCallsInit() {
         HandlerChainType hc = createHandlerChainType();
         hc.getHandler().remove(3);
@@ -111,6 +115,7 @@
         assertEquals("2", cfg.get("bar"));
     }
 
+    @Test
     public void testBuilderCallsInitWithNoInitParamValues() {
         HandlerChainType hc = createHandlerChainType();
         hc.getHandler().remove(3);
@@ -136,6 +141,7 @@
         assertEquals(1, cfg.keySet().size());
     }
 
+    @Test
     public void testBuilderCannotLoadHandlerClass() {
         HandlerChainType hc = createHandlerChainType();
         hc.getHandler().remove(3);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java Tue Jun 12 01:08:04 2007
@@ -42,15 +42,17 @@
 import javax.xml.ws.handler.MessageContext;
 import javax.xml.ws.handler.soap.SOAPMessageContext;
 
-import junit.framework.TestCase;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.jaxws.context.WrappedMessageContext;
 import org.apache.cxf.jaxws.handler.logical.LogicalMessageContextImpl;
 import org.apache.cxf.jaxws.handler.soap.SOAPMessageContextImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class HandlerChainInvokerTest extends TestCase {
+public class HandlerChainInvokerTest extends Assert {
 
     private static final int HANDLER_COUNT = 4;
 
@@ -62,6 +64,7 @@
     TestLogicalHandler[] logicalHandlers = new TestLogicalHandler[HANDLER_COUNT];
     TestProtocolHandler[] protocolHandlers = new TestProtocolHandler[HANDLER_COUNT];
 
+    @Before
     public void setUp() {
         AbstractHandlerBase.clear();
 
@@ -86,12 +89,14 @@
         
     }
 
+    @Test
     public void testInvokeEmptyHandlerChain() {
         invoker = new HandlerChainInvoker(new ArrayList<Handler>());
         assertTrue(invoker.invokeLogicalHandlers(false, lmc));
         assertTrue(invoker.invokeProtocolHandlers(false, pmc));
     }
 
+    @Test
     public void testHandlerPartitioning() {
 
         assertEquals(HANDLER_COUNT, invoker.getLogicalHandlers().size());
@@ -106,6 +111,7 @@
 
     }
 
+    @Test
     public void testInvokeHandlersInbound() {
 
         invoker.setInbound();
@@ -128,6 +134,7 @@
             .getInvokeOrderOfHandleMessage());
     }
 
+    @Test
     public void testLogicalHandlerReturnFalseOutboundResponseExpected() {
 
         assertEquals(0, logicalHandlers[0].getHandleMessageCount());
@@ -163,6 +170,7 @@
         assertTrue(invoker.isInbound());
     }
 
+    @Test
     public void testLogicalHandlerInboundProcessingStoppedResponseExpected() {
 
         assertEquals(0, logicalHandlers[0].getHandleMessageCount());
@@ -180,6 +188,7 @@
         assertTrue(invoker.isOutbound());
     }
     
+    @Test
     public void testHandleMessageReturnsFalseOutbound() {
         protocolHandlers[2].setHandleMessageRet(false);
 
@@ -237,6 +246,7 @@
         assertEquals(0, protocolHandlers[2].getHandleFaultCount());    
     }
     
+    @Test
     public void testHandleMessageThrowsProtocolExceptionOutbound() {
         ProtocolException pe = new ProtocolException("banzai");
         protocolHandlers[2].setException(pe);
@@ -322,6 +332,7 @@
                    < protocolHandlers[1].getInvokeOrderOfHandleFault());
     }
     
+    @Test
     public void testHandleFaultReturnsFalseOutbound() {
         ProtocolException pe = new ProtocolException("banzai");
         protocolHandlers[2].setException(pe);
@@ -390,6 +401,7 @@
                    < protocolHandlers[1].getInvokeOrderOfHandleFault());
     }
    
+    @Test
     public void testHandleMessageReturnsTrue() {
         assertFalse(invoker.faultRaised());
 
@@ -428,7 +440,8 @@
     //depend on whether the message exchange pattern (MEP) in use requires a response to the 
     //message currently being processed or not: 
     //Response The message direction is reversed, the runtime invokes handleMessage on the next
-    //handler or dispatches the message (see section 9.1.2.2) if there are no further handlers. 
+    //handler or dispatches the message (see section 9.1.2.2) if there are no further handlers.
+    @Test
     public void testHandleMessageReturnsFalseWithResponseExpected() {
         assertFalse(invoker.faultRaised());
 
@@ -478,7 +491,8 @@
     //depend on whether the message exchange pattern (MEP) in use requires a response to the 
     //message currently being processed or not: 
     //No response Normal message processing stops, close is called on each previously invoked handler
-    //in the chain, the message is dispatched 
+    //in the chain, the message is dispatched
+    @Test
     public void testHandleMessageReturnsFalseWithNoResponseExpected() {
         assertFalse(invoker.faultRaised());
 
@@ -522,6 +536,7 @@
     //is reversed, if the message is not already a fault message then it is replaced with a fault message, 
     //and the runtime invokes handleFault on the next handler or dispatches the message (see 
     //section 9.1.2.2) if there are no further handlers.
+    @Test
     public void testHandleMessageThrowsProtocolExceptionWithResponseExpected() {
         assertFalse(invoker.faultRaised());
 
@@ -585,6 +600,7 @@
     //being processed or not:
     //No response Normal message processing stops, close is called on each previously invoked handler 
     //in the chain, the exception is dispatched
+    @Test
     public void testHandleMessageThrowsProtocolExceptionWithNoResponseExpected() {
         assertFalse(invoker.faultRaised());
 
@@ -630,6 +646,7 @@
     //processed or not: 
     //Response Normal message processing stops, close is called on each previously invoked handler in 
     //the chain, the message direction is reversed, and the exception is dispatched
+    @Test
     public void testHandleMessageThrowsRuntimeExceptionWithResponseExpected() {
         assertFalse(invoker.faultRaised());
 
@@ -667,6 +684,7 @@
         assertEquals(0, logicalHandlers[3].getCloseCount());
     }
 
+    @Test
     public void testFaultRaised() {
 
         assertFalse(invoker.faultRaised());
@@ -693,7 +711,8 @@
     // JAXB spec 9.3.2.2: Throw ProtocolException or a subclass This indicates
     // that fault message processing should cease. Fault message processing
     // stops, close is called on each previously invoked handler in the chain, the
-    // exception is dispatched       
+    // exception is dispatched
+    @Test
     public void testHandleFaultThrowsProtocolException() {
         ProtocolException pe = new ProtocolException("banzai");
         ProtocolException pe2 = new ProtocolException("banzai2");
@@ -739,6 +758,7 @@
     // that fault message processing should cease. Fault message processing stops,
     // close is called on each previously invoked handler in the chain, the exception is
     // dispatched
+    @Test
     public void testHandleFaultThrowsRuntimeException() {
         ProtocolException pe = new ProtocolException("banzai");
         RuntimeException re = new RuntimeException("banzai");
@@ -781,7 +801,8 @@
     
     //JAXB spec 9.3.2.2: Return true This indicates that fault message processing 
     //should continue. The runtime invokes handle Fault on the next handler or dispatches 
-    //the fault message (see section 9.1.2.2) if there are no further handlers. 
+    //the fault message (see section 9.1.2.2) if there are no further handlers.
+    @Test
     public void testHandleFaultReturnsTrue() {
         ProtocolException pe = new ProtocolException("banzai");
         logicalHandlers[2].setException(pe);
@@ -824,7 +845,8 @@
     
     //JAXB spec 9.3.2.2: Return false This indicates that fault message processing 
     //should cease. Fault message processing stops, close is called on each previously invoked
-    //handler in the chain, the fault message is dispatched 
+    //handler in the chain, the fault message is dispatched
+    @Test
     public void testHandleFaultReturnsFalse() {
         ProtocolException pe = new ProtocolException("banzai");
         logicalHandlers[3].setException(pe);
@@ -870,6 +892,7 @@
                    < logicalHandlers[0].getInvokeOrderOfClose());
     }
     
+    @Test
     public void testMEPComplete() {
 
         invoker.invokeLogicalHandlers(false, lmc);
@@ -892,6 +915,7 @@
     }
 
 
+    @Test
     public void testResponseExpectedDefault() {
         assertTrue(invoker.isResponseExpected());
     }
@@ -900,6 +924,7 @@
      * with both protocol and logical handlers in invokedHandlers list.
      *
      */
+    @Test
     public void testInvokedAlreadyInvokedMixed() {
 
         // simulate an invocation being aborted by a logical handler

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/InitParamResourceResolverTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/InitParamResourceResolverTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/InitParamResourceResolverTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/InitParamResourceResolverTest.java Tue Jun 12 01:08:04 2007
@@ -22,9 +22,12 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class InitParamResourceResolverTest extends TestCase {
+
+public class InitParamResourceResolverTest extends Assert {
 
     public static final String STRING_PARAM = "stringParam";
     public static final String STRING_VALUE = "a string";
@@ -49,6 +52,7 @@
     
     private InitParamResourceResolver resolver; 
     
+    @Before
     public void setUp() {
         params.put(STRING_PARAM, STRING_VALUE);
         params.put(INT_PARAM, INT_VALUE);
@@ -66,40 +70,47 @@
      char, byte, short, int, long, float, double, boolean
      */
     
+    @Test
     public void testResolveChar() {
         doResolveTypeTest(CHAR_PARAM, Character.class, CHAR_VALUE.charAt(0));
     }
     
+    @Test
     public void testResolveByte() {
         doResolveTypeTest(BYTE_PARAM, Byte.class, Byte.valueOf(BYTE_VALUE));
     }
     
+    @Test
     public void testResolveShort() {
         doResolveTypeTest(SHORT_PARAM, Short.class, Short.valueOf(SHORT_VALUE));
     }
     
-    
+    @Test
     public void testResolveLong() {
         doResolveTypeTest(LONG_PARAM, Long.class, Long.valueOf(LONG_VALUE));
     }
     
+    @Test
     public void testResolveFloat() {
         doResolveTypeTest(FLOAT_PARAM, Float.class, Float.valueOf(FLOAT_VALUE));
     }
     
+    @Test
     public void testResolveDouble() {
         doResolveTypeTest(DOUBLE_PARAM, Double.class, Double.valueOf(DOUBLE_VALUE));
     }
     
+    @Test
     public void tesResolveBoolean() {
         doResolveTypeTest(BOOLEAN_PARAM, Boolean.class, Boolean.valueOf(BOOLEAN_VALUE));
     }
     
-    
+    @Test
     public void testResolveInt() {        
         doResolveTypeTest(INT_PARAM, Integer.class, Integer.valueOf(INT_VALUE));
     }
 
+    @Test
     public void testResolveString() {        
         String ret = resolver.resolve(STRING_PARAM, String.class);        
         assertEquals("incorrect string value returned", STRING_VALUE, ret);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -30,7 +30,6 @@
 import javax.xml.ws.handler.LogicalMessageContext;
 import javax.xml.ws.handler.MessageContext;
 
-import junit.framework.TestCase;
 import org.apache.cxf.interceptor.InterceptorChain;
 import org.apache.cxf.jaxws.handler.logical.LogicalHandlerInInterceptor;
 import org.apache.cxf.message.Exchange;
@@ -40,13 +39,17 @@
 import org.apache.handlers.types.AddNumbersResponse;
 import org.easymock.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 import static org.easymock.EasyMock.eq;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.isA;
 import static org.easymock.classextension.EasyMock.createNiceControl;
 
-public class LogicalHandlerInterceptorTest extends TestCase {
+public class LogicalHandlerInterceptorTest extends Assert {
 
     private IMocksControl control;
     private Binding binding;
@@ -54,6 +57,7 @@
     private Message message;
     private Exchange exchange;
 
+    @Before
     public void setUp() {
         control = createNiceControl();
         binding = control.createMock(Binding.class);
@@ -62,9 +66,11 @@
         exchange = control.createMock(Exchange.class);
     }
 
+    @After
     public void tearDown() {
     }
 
+    @Test
     public void testInterceptSuccess() {
         List<LogicalHandler> list = new ArrayList<LogicalHandler>();
         list.add(new LogicalHandler() {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalMessageImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalMessageImplTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalMessageImplTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalMessageImplTest.java Tue Jun 12 01:08:04 2007
@@ -25,18 +25,21 @@
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
 
-import junit.framework.TestCase;
 import org.apache.cxf.jaxws.handler.logical.LogicalMessageContextImpl;
 import org.apache.cxf.jaxws.handler.logical.LogicalMessageImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 import org.apache.handlers.types.AddNumbers;
 import org.apache.handlers.types.ObjectFactory;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class LogicalMessageImplTest extends TestCase {
+public class LogicalMessageImplTest extends Assert {
     AddNumbers req;
     List<Object> args;
 
+    @Before
     public void setUp() {
         req = new AddNumbers();        
         req.setArg0(10);
@@ -45,6 +48,7 @@
         args.add(req);
     }
 
+    @Test
     public void testGetPayloadOfJAXB() throws Exception {
         //using Dispatch
         JAXBContext ctx = JAXBContext.newInstance(ObjectFactory.class);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java Tue Jun 12 01:08:04 2007
@@ -53,7 +53,6 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
-import junit.framework.TestCase;
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.SoapVersion;
@@ -72,21 +71,28 @@
 import org.apache.cxf.staxutils.PartialXMLStreamReader;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.easymock.classextension.IMocksControl;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 
 import static org.easymock.EasyMock.expect;
 import static org.easymock.classextension.EasyMock.createNiceControl;
 
-public class SOAPHandlerInterceptorTest extends TestCase {
+public class SOAPHandlerInterceptorTest extends Assert {
 
+    @Before
     public void setUp() {
     }
 
+    @After
     public void tearDown() {
     }
 
     // SAAJ tree is created from DOMXMLStreamWriter. Any changes to SOAPMessage should be streamed back to
     // outputStream
+    @Test
     public void testChangeSOAPBodyOutBound() throws Exception {
         List<Handler> list = new ArrayList<Handler>();
         list.add(new SOAPHandler<SOAPMessageContext>() {
@@ -179,6 +185,7 @@
         assertEquals("100", elem3Element.getTextContent());
     }
 
+    @Test
     public void testChangeSOAPHeaderInBound() throws Exception {
         List<Handler> list = new ArrayList<Handler>();
         list.add(new SOAPHandler<SOAPMessageContext>() {
@@ -272,6 +279,7 @@
         assertEquals("false", requiredHeader.getAttributeNS(soapVersion.getNamespace(), "mustUnderstand"));
     }
 
+    @Test
     public void testChangeSOAPHeaderOutBound() throws Exception {
         List<Handler> list = new ArrayList<Handler>();
         list.add(new SOAPHandler<SOAPMessageContext>() {
@@ -366,6 +374,7 @@
         assertEquals("false", headerElementNew.getAttributeNS(soapVersion.getNamespace(), "mustUnderstand"));
     }
 
+    @Test
     public void testGetSOAPMessageInBound() throws Exception {
         List<Handler> list = new ArrayList<Handler>();
         list.add(new SOAPHandler<SOAPMessageContext>() {
@@ -422,6 +431,7 @@
         assertEquals("sendReceiveData", qn.getLocalPart());
     }
 
+    @Test
     public void testGetUnderstoodHeadersReturnsNull() {
         List<Handler> list = new ArrayList<Handler>();
         list.add(new SOAPHandler<SOAPMessageContext>() {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java Tue Jun 12 01:08:04 2007
@@ -24,10 +24,13 @@
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Unmarshaller;
 
-import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class WebservicesTypeTest extends TestCase {
 
+public class WebservicesTypeTest extends Assert {
+
+    @Test
     public void testReadWebservicesXml() throws Exception {
         JAXBContext ctx = JAXBContext.newInstance(WebservicesType.class);
         InputStream in = this.getClass().getClassLoader().getResourceAsStream("webservices.xml");



Mime
View raw message