cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r546410 [1/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
Author: ffang
Date: Tue Jun 12 01:08:04 2007
New Revision: 546410

URL: http://svn.apache.org/viewvc?view=rev&rev=546410
Log:
[CXF-720] update many tests to junit4.0

Modified:
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitTest.java
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java
    incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/classloader/PlugInClassLoaderTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/logging/LoggerHelperTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/HandlerTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ManagedConnectionFactoryImplTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ManagedConnectionImplTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceAdapterInternalExceptionTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceBeanTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/UriHandlerInitTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImplTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/CXFConnectionRequestInfoTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ConnectionFactoryImplTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImplTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionImplTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionTestBase.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ResourceAdapterImplTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/AbstractInvocationHandlerTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/HandlerTestBase.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ObjectMethodInvocationHandlerTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/jarloader/JarLoaderTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/servant/CXFConnectEJBServantTest.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/servant/ThreadContextCheckerHome.java
    incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/InflectorTest.java
    incubator/cxf/trunk/rt/bindings/http/src/test/java/org/apache/cxf/binding/http/IriDecoderTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/MustUnderstandInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCInInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/RPCOutInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ReadHeaderInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/ServiceModelUtilTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapActionInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapDestinationFactoryTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/TestBase.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/XMLBindingFactoryTest.java
    incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/TestBase.java
    incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLFaultInterceptorsTest.java
    incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLFaultOutInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptorTest.java
    incubator/cxf/trunk/rt/bindings/xml/src/test/java/org/apache/cxf/binding/xml/interceptor/XMLMessageOutInterceptorTest.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareInInterceptorTest.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/BareOutInterceptorTest.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DocLiteralInInterceptorTest.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBDataBindingTest.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/TestBase.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/WrappedInInterceptorTest.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/io/XMLStreamDataReaderTest.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/io/XMLStreamDataWriterTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/context/WebServiceContextImplTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AbstractProtocolHandlerInterceptorTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/AnnotationHandlerChainBuilderTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainBuilderTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/InitParamResourceResolverTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalMessageImplTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/javaee/WebservicesTypeTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/ContextPropertiesMappingTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfoTest.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/support/JaxWsServiceConfigurationTest.java
    incubator/cxf/trunk/rt/frontend/js/src/test/java/org/apache/cxf/js/rhino/AbstractDOMProviderTest.java
    incubator/cxf/trunk/rt/frontend/js/src/test/java/org/apache/cxf/js/rhino/ProviderFactoryTest.java
    incubator/cxf/trunk/rt/frontend/js/src/test/java/org/apache/cxf/js/rhino/ServerAppTest.java
    incubator/cxf/trunk/rt/transports/local/src/test/java/org/apache/cxf/transport/local/LocalTransportFactoryTest.java
    incubator/cxf/trunk/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/AddressingBuilderImplTest.java
    incubator/cxf/trunk/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/AddressingBuilderTest.java
    incubator/cxf/trunk/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/AddressingConstantsImplTest.java
    incubator/cxf/trunk/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/MAPAggregatorTest.java
    incubator/cxf/trunk/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/ClientMtomXopTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/TestAttachmentOutInterceptor.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/mtom/TestMultipartMessageInterceptor.java
    incubator/cxf/trunk/testutils/src/test/java/org/apache/header_test/rpc/TestRPCHeaderTest.java
    incubator/cxf/trunk/tools/common/src/test/java/org/apache/cxf/tools/common/ToolContextTest.java
    incubator/cxf/trunk/tools/common/src/test/java/org/apache/cxf/tools/util/BuiltInTypesJavaMappingUtilTest.java
    incubator/cxf/trunk/tools/common/src/test/java/org/apache/cxf/tools/util/FileWriterUtilTest.java
    incubator/cxf/trunk/tools/common/src/test/java/org/apache/cxf/tools/util/NameUtilTest.java
    incubator/cxf/trunk/tools/common/src/test/java/org/apache/cxf/tools/util/URIParserUtilTest.java
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/WSDLGeneratorFactoryTest.java
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanAnnotatorTest.java
    incubator/cxf/trunk/tools/javato/test/src/test/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanFieldAnnotatorTest.java
    incubator/cxf/trunk/tools/wsdlto/core/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainerTest.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSProfileTest.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessorTest.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtilTest.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebMethodAnnotatorTest.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotatorTest.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/InterfaceMapperTest.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/MethodMapperTest.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/WSDLToJavaTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/core/PluginLoaderTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java

Modified: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java (original)
+++ incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitManagerTest.java Tue Jun 12 01:08:04 2007
@@ -24,7 +24,6 @@
 import javax.jbi.component.ComponentContext;
 import javax.jbi.management.DeploymentException;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
@@ -32,8 +31,12 @@
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.Configurer;
 import org.easymock.EasyMock;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class CXFServiceUnitManagerTest extends TestCase {
+public class CXFServiceUnitManagerTest extends Assert {
     
     private static final Logger LOG = LogUtils.getL7dLogger(CXFServiceUnitManagerTest.class);
 
@@ -43,6 +46,7 @@
     private ComponentContext ctx = EasyMock.createMock(ComponentContext.class);
     private Bus bus;    
     
+    @Before
     public void setUp() throws Exception {
         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
         
@@ -54,10 +58,12 @@
         csuManager = new CXFServiceUnitManager(bus, ctx, componentClassLoader);
     }
     
+    @After
     public void tearDown() throws Exception {
         bus.shutdown(false);
     }
     
+    @Test
     public void testShutdownWithNull() throws Exception {
         
         try {
@@ -69,6 +75,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testShutdownWithEmpty() throws Exception {
         
         try {
@@ -80,6 +87,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testShutdownWithUndeployedSU() {
         try {
             csuManager.shutDown("dummySU");
@@ -91,6 +99,7 @@
     }
     
 
+    @Test
     public void testDeployWithNullSUName() throws Exception {
         
         try {
@@ -102,6 +111,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testDeployWithEmptySUName() throws Exception {
         
         try {
@@ -113,6 +123,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testDeployWithDuplicatedSU() {
         try {
             csuManager.deploy("dummySU", "dummyRoot");
@@ -125,6 +136,7 @@
         fail("should get DeploymentException");
     }
 
+    @Test
     public void testDeployWithNullSURoot() throws Exception {
         
         try {
@@ -136,6 +148,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testDeployWithEmptySURoot() throws Exception {
         
         try {
@@ -147,6 +160,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testUndeployWithNullSUName() throws Exception {
         
         try {
@@ -158,6 +172,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testUndeployWithEmptySUName() throws Exception {
         
         try {
@@ -170,6 +185,7 @@
     }
     
     
+    @Test
     public void testUndeployWithNullSURoot() throws Exception {
         
         try {
@@ -181,6 +197,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testUndeployWithEmptySURoot() throws Exception {
         
         try {
@@ -192,6 +209,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testInitWithNullSUName() throws Exception {
         
         try {
@@ -203,6 +221,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testInitWithEmptySUName() throws Exception {
         
         try {
@@ -215,6 +234,7 @@
     }
     
     
+    @Test
     public void testInitWithNullSURoot() throws Exception {
         
         try {
@@ -226,6 +246,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testInitWithEmptySURoot() throws Exception {
         
         try {
@@ -237,6 +258,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testStartWithNullSUName() throws Exception {
         
         try {
@@ -248,6 +270,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testStartWithEmptySUName() throws Exception {
         
         try {
@@ -259,6 +282,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testStopWithNullSUName() throws Exception {
         
         try {
@@ -270,6 +294,7 @@
         fail("should get DeploymentException");        
     }
     
+    @Test
     public void testStopWithEmptySUName() throws Exception {
         
         try {

Modified: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitTest.java (original)
+++ incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/CXFServiceUnitTest.java Tue Jun 12 01:08:04 2007
@@ -25,8 +25,6 @@
 import javax.jbi.JBIException;
 import javax.jbi.component.ComponentContext;
 import javax.jbi.messaging.DeliveryChannel;
- 
-import junit.framework.TestCase;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
@@ -37,9 +35,12 @@
 import org.apache.cxf.transport.ConduitInitiatorManager;
 import org.apache.cxf.transport.jbi.JBITransportFactory;
 import org.easymock.classextension.EasyMock;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 
-public class CXFServiceUnitTest extends TestCase {
+public class CXFServiceUnitTest extends Assert {
 
     private static final Logger LOG = LogUtils.getL7dLogger(CXFServiceUnitTest.class);
     private static final String ROOT_PATH =
@@ -55,6 +56,7 @@
     private Bus bus;
     private JBITransportFactory jbiTransportFactory;
      
+    @Before
     public void setUp() throws Exception {
         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
         absCsuPath = getClass().getResource(ROOT_PATH).toURI().getPath();
@@ -77,10 +79,12 @@
         EasyMock.replay(channel);
     }
      
+    @Test
     public void tearDown() throws Exception {
         bus.shutdown(false);
     }
      
+    @Test
     public void testPrepare() throws Exception {
         csu.prepare(ctx);
         assertTrue(csu.isServiceProvider());
@@ -88,20 +92,24 @@
         assertEquals(csu.getServiceName().getLocalPart(), "HelloWorldService");
     }
      
+    @Test
     public void testEndpintName() throws Exception {
         assertEquals(csu.getEndpointName(), "SE_Endpoint");
     }
      
+    @Test
     public void testServiceName() throws Exception {
         csu.prepare(ctx);
         assertEquals(csu.getServiceName().getNamespaceURI(), "http://apache.org/hello_world");
         assertEquals(csu.getServiceName().getLocalPart(), "HelloWorldService");
     }
      
+    @Test
     public void testStart() throws Exception {
          
     }
-     
+    
+    @Test
     public void testStop() throws Exception {
          
     }

Modified: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java (original)
+++ incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdownTest.java Tue Jun 12 01:08:04 2007
@@ -21,25 +21,29 @@
 
 import javax.jbi.JBIException;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.jbi.se.state.ServiceEngineStateMachine.SEOperation;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class ServiceEngineShutdownTest extends TestCase {
+public class ServiceEngineShutdownTest extends Assert {
     private ServiceEngineStateFactory stateFactory;
     private ServiceEngineStateMachine shutdown;
     
-    
+    @Before
     public void setUp() throws Exception {
         stateFactory = ServiceEngineStateFactory.getInstance();
         shutdown = stateFactory.getShutdownState();
     }
     
+    @Test
     public void testInitOperation() throws Exception {
         shutdown.changeState(SEOperation.init, null);
         assertTrue(stateFactory.getCurrentState() instanceof ServiceEngineStop);
     }
     
+    @Test
     public void testStartOperation() throws Exception {
         try {
             shutdown.changeState(SEOperation.start, null);
@@ -49,6 +53,7 @@
         fail();
     }
     
+    @Test
     public void testStopOperation() throws Exception {
         try {
             shutdown.changeState(SEOperation.stop, null);
@@ -58,6 +63,7 @@
         fail();
     }
     
+    @Test
     public void testShutdownOperation() throws Exception {
         try {
             shutdown.changeState(SEOperation.shutdown, null);

Modified: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java (original)
+++ incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStartTest.java Tue Jun 12 01:08:04 2007
@@ -21,24 +21,29 @@
 
 import javax.jbi.JBIException;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.jbi.se.state.ServiceEngineStateMachine.SEOperation;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class ServiceEngineStartTest extends TestCase {
+public class ServiceEngineStartTest extends Assert {
     private ServiceEngineStateFactory stateFactory;
     private ServiceEngineStateMachine start;
     
+    @Before
     public void setUp() throws Exception {
         stateFactory = ServiceEngineStateFactory.getInstance();
         start = stateFactory.getStartState();
     }
     
+    @Test
     public void testStopOperation() throws Exception {
         start.changeState(SEOperation.stop, null);
         assertTrue(stateFactory.getCurrentState() instanceof ServiceEngineStop);
     }
     
+    @Test
     public void testStartOperation() throws Exception {
         try {
             start.changeState(SEOperation.start, null);
@@ -48,6 +53,7 @@
         fail();
     }
     
+    @Test
     public void testInitOperation() throws Exception {
         try {
             start.changeState(SEOperation.init, null);
@@ -57,6 +63,7 @@
         fail();
     }
     
+    @Test
     public void testShutdownOperation() throws Exception {
         try {
             start.changeState(SEOperation.shutdown, null);

Modified: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java (original)
+++ incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStateFactoryTest.java Tue Jun 12 01:08:04 2007
@@ -19,24 +19,29 @@
 
 package org.apache.cxf.jbi.se.state;
 
-import junit.framework.TestCase;
 
 import org.apache.cxf.jbi.se.state.ServiceEngineStateMachine.SEOperation;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class ServiceEngineStateFactoryTest extends TestCase {
+public class ServiceEngineStateFactoryTest extends Assert {
     private ServiceEngineStateFactory stateFactory;
     private ServiceEngineStateMachine state;
         
+    @Before
     public void setUp() throws Exception {
         stateFactory = ServiceEngineStateFactory.getInstance();
         state = stateFactory.getShutdownState();
     }
     
+    @Test
     public void testSinglton() throws Exception {
         assertSame(stateFactory, 
                    ServiceEngineStateFactory.getInstance());
     }
     
+    @Test
     public void testLifeCycle() throws Exception {
         stateFactory.setCurrentState(state);
         assertSame(state, stateFactory.getCurrentState());

Modified: incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java (original)
+++ incubator/cxf/trunk/integration/jbi/src/test/java/org/apache/cxf/jbi/se/state/ServiceEngineStopTest.java Tue Jun 12 01:08:04 2007
@@ -21,30 +21,35 @@
 
 import javax.jbi.JBIException;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.jbi.se.state.ServiceEngineStateMachine.SEOperation;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class ServiceEngineStopTest extends TestCase {
+public class ServiceEngineStopTest extends Assert {
 
     private ServiceEngineStateFactory stateFactory;
     private ServiceEngineStateMachine stop;
     
+    @Before
     public void setUp() throws Exception {
         stateFactory = ServiceEngineStateFactory.getInstance();
         stop = stateFactory.getStopState();
     }
     
+    @Test
     public void testStartOperation() throws Exception {
         stop.changeState(SEOperation.start, null);
         assertTrue(stateFactory.getCurrentState() instanceof ServiceEngineStart);
     }
     
+    @Test
     public void testShutdownOperation() throws Exception {
         stop.changeState(SEOperation.shutdown, null);
         assertTrue(stateFactory.getCurrentState() instanceof ServiceEngineShutdown);
     }
     
+    @Test
     public void testStopOperation() throws Exception {
         try {
             stop.changeState(SEOperation.stop, null);
@@ -54,6 +59,7 @@
         fail();
     }
     
+    @Test
     public void testInitOperation() throws Exception {
         try {
             stop.changeState(SEOperation.init, null);

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/classloader/PlugInClassLoaderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/classloader/PlugInClassLoaderTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/classloader/PlugInClassLoaderTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/classloader/PlugInClassLoaderTest.java Tue Jun 12 01:08:04 2007
@@ -25,29 +25,20 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 
-public class PlugInClassLoaderTest extends TestCase {
+
+public class PlugInClassLoaderTest extends Assert {
     private static final Logger LOG = Logger.getLogger(PlugInClassLoaderTest.class.getName());
     private static boolean debug;
     PlugInClassLoader plugInClassLoader;
    
-    public PlugInClassLoaderTest(String name) {
-        super(name);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {PlugInClassLoaderTest.class.getName()});
-    }
-
-    public static Test suite() {
-        return new TestSuite(PlugInClassLoaderTest.class);
-    }
+    
 
+    @Before
     public void setUp() throws Exception {
         plugInClassLoader = new PlugInClassLoader(getClass().getClassLoader());
         if (debug) {
@@ -57,6 +48,7 @@
         }
     }
 
+    @Test
     public void testLoadClassWithPlugInClassLoader() throws Exception {
         Class resultClass = plugInClassLoader.loadClass(
                 "org.apache.cxf.jca.dummy.Dummy");
@@ -66,6 +58,7 @@
             plugInClassLoader, resultClass.getClassLoader());
     }
 
+    @Test
     public void testInheritsClassLoaderProtectionDomain()
         throws Exception {
         Class resultClass = plugInClassLoader.loadClass(
@@ -78,6 +71,7 @@
             pd1, pd2);
     }
 
+    @Test
     public void testLoadClassWithParentClassLoader() throws Exception {
         Class resultClass = plugInClassLoader.loadClass("org.omg.CORBA.ORB");
         assertEquals("wrong class", "org.omg.CORBA.ORB", resultClass.getName());
@@ -85,6 +79,7 @@
             !(plugInClassLoader.equals(resultClass.getClassLoader())));
     }
 
+    @Test
     public void testLoadNonExistentClassWithPlugInClassLoader()
         throws Exception {
         try {
@@ -98,6 +93,7 @@
         }
     }
 
+    @Test
     public void testLoadNonFilteredButAvailableClassWithPlugInClassLoader()
         throws Exception {
         String className = "javax.resource.ResourceException";
@@ -113,6 +109,7 @@
         }
     }
 
+    @Test
     public void testLoadResourceWithPluginClassLoader()
         throws Exception {
         Class resultClass = plugInClassLoader.loadClass(
@@ -135,6 +132,7 @@
         assertEquals("unexpected dummy.txt contents.", "blah,blah.", result);
     }
 
+    @Test
     public void testLoadSlashResourceWithPluginClassLoader()
         throws Exception {
         Class resultClass = plugInClassLoader.loadClass(
@@ -156,6 +154,7 @@
         assertTrue("unexpected dummy.txt contents:"  + result, result.indexOf("Manifest-Version: 1.0") != -1);
     }
 
+    @Test
     public void testLoadNonExistentResourceWithPluginClassLoader()
         throws Exception {
         Class resultClass = plugInClassLoader.loadClass(
@@ -164,11 +163,13 @@
         assertNull("url must be null. ", url);
     }
 
+    @Test
     public void testLoadNonExistentDirectory() throws Exception {
         URL url = plugInClassLoader.findResource("foo/bar/");
         assertNull("url must be null. ", url);
     }
 
+    @Test
     public void testLoadNonExistentNestedDirectory() throws Exception {
         URL url = plugInClassLoader.findResource("foo!/bar/");
         assertNull("url must be null. ", url);

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/logging/LoggerHelperTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/logging/LoggerHelperTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/logging/LoggerHelperTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/logging/LoggerHelperTest.java Tue Jun 12 01:08:04 2007
@@ -23,24 +23,25 @@
 import java.util.logging.Handler;
 import java.util.logging.Logger;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class LoggerHelperTest extends TestCase {
+
+public class LoggerHelperTest extends Assert {
     public static final String TEST_LOGGER_NAME = "test.logger";
 
-    public LoggerHelperTest(String name) {
-        super(name);
-    }
 
+    @Before
     public void setUp() {
     }
 
+    @After
     public void tearDown() {
     }
 
+    @Test
     public void testEnableDisableConsoleLogging() {
         Logger rootLogger = Logger.getLogger("");
         Handler handler;
@@ -59,6 +60,7 @@
         assertNull("Unexpected appender after disable", handler);
     }
 
+    @Test
     public void testSettingLogLevel() {
         LoggerHelper.setRootLoggerName(TEST_LOGGER_NAME);
         LoggerHelper.setLogLevel("INFO");
@@ -67,6 +69,7 @@
             .getLevel().toString());
     }
 
+    @Test
     public void testSetWriter() {
         // setup an dummy writer
         DummyWriter writer = new DummyWriter();
@@ -77,10 +80,6 @@
         assertTrue("The DummyWriter didn't be setup", writer.writed);
     }
 
-    public static Test suite() {
-        return new TestSuite(LoggerHelperTest.class);
-    }
-
     class DummyWriter extends Writer {
         boolean writed;
         boolean flushed;
@@ -103,7 +102,5 @@
 
     }
 
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {LoggerHelperTest.class.getName()});
-    }
+    
 }

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/HandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/HandlerTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/HandlerTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/HandlerTest.java Tue Jun 12 01:08:04 2007
@@ -22,22 +22,21 @@
 import java.io.InputStream;
 import java.net.URL;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class HandlerTest extends TestCase {
+
+public class HandlerTest extends Assert {
     Handler h; 
     
-    public HandlerTest(String name) {
-        super(name);
-    }
-
+    
+    @Before
     public void setUp() throws ClassNotFoundException { 
         h = new Handler();
     } 
     
+    @Test
     public void testGetStreamToThisResource() throws Exception { 
         String urlpath = HandlerTest.class.getName().replace('.', '/') + ".class";
         String urls = "resourceadapter:" + urlpath;
@@ -47,6 +46,7 @@
     }
 
 
+    @Test
     public void testGetStreamToNonExistantResourceThrows() throws Exception { 
         String path = "some gobbledy rubbish/that/does/not/exist";
         String urls = "resourceadapter:" + path;
@@ -61,12 +61,6 @@
     }
 
        
-    public static Test suite() {
-        return new TestSuite(HandlerTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {HandlerTest.class.getName()});
-    }
+    
 }
 

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ManagedConnectionFactoryImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ManagedConnectionFactoryImplTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ManagedConnectionFactoryImplTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ManagedConnectionFactoryImplTest.java Tue Jun 12 01:08:04 2007
@@ -31,23 +31,22 @@
 import javax.resource.spi.ResourceAdapterInternalException;
 import javax.security.auth.Subject;
 
-import junit.framework.TestCase;
 
 import org.easymock.classextension.EasyMock;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class ManagedConnectionFactoryImplTest extends TestCase {
+public class ManagedConnectionFactoryImplTest extends Assert {
     DummyManagedConnectionFactoryImpl mcf = new DummyManagedConnectionFactoryImpl();
 
-    public ManagedConnectionFactoryImplTest(String name) {
-        super(name);
-    }
 
+    @Test
     public void testManagedConnectionFactoryImplInstanceOfResourceBean() throws Exception {
         assertNotNull("mcf is not null", mcf);
         assertTrue("ManagedConnectionFactoryImpl is ResourceBean", mcf instanceof ResourceBean);
     }
 
-    
+    @Test
     public void testMatchConnectionSameConnectioRequestInfoNotBound() throws Exception {
         Subject subject = null;
         Set<AbstractManagedConnectionImpl> connectionSet = new HashSet<AbstractManagedConnectionImpl>();
@@ -59,7 +58,7 @@
         assertEquals(con1, mcon);
     }
 
-   
+    @Test
     public void testMatchConnectionSameConnectioRequestInfoBound() throws Exception {
         Subject subject = null;
         Set<AbstractManagedConnectionImpl> connectionSet = new HashSet<AbstractManagedConnectionImpl>();
@@ -72,7 +71,7 @@
         assertEquals(con1, mcon);
     }
 
-    
+    @Test
     public void testMatchConnectionDifferentConnectioRequestInfoNotBound() throws Exception {
         ConnectionRequestInfo cri1 = new DummyConnectionRequestInfo();
         ConnectionRequestInfo cri2 = new DummyConnectionRequestInfo();
@@ -88,7 +87,7 @@
         assertEquals("incorrect connection returned", con1, mcon);
     }
 
-   
+    @Test
     public void testMatchConnectionDifferentConnectioRequestInfoBound() throws Exception {
         ConnectionRequestInfo cri1 = new DummyConnectionRequestInfo();
         ConnectionRequestInfo cri2 = new DummyConnectionRequestInfo();
@@ -106,7 +105,7 @@
         assertTrue("should not get a match", mcon == null);
     }
 
-    
+    @Test
     public void testMatchConnectionInvalidatedWithSameConnectioRequestInfo() throws Exception {
         Subject subject = null;
         Set<AbstractManagedConnectionImpl> connectionSet = new HashSet<AbstractManagedConnectionImpl>();
@@ -121,6 +120,7 @@
         assertTrue("Connection must be null", mcon == null);
     }
 
+    @Test
     public void testGetSetLogWriter() throws Exception {
         PrintWriter writer = EasyMock.createMock(PrintWriter.class); 
         writer.write(EasyMock.isA(String.class));
@@ -136,6 +136,7 @@
         EasyMock.verify(writer);
     }
 
+    @Test
     public void testSetNullLogWriter() throws Exception {
         try {
             mcf.setLogWriter(null);

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ManagedConnectionImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ManagedConnectionImplTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ManagedConnectionImplTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ManagedConnectionImplTest.java Tue Jun 12 01:08:04 2007
@@ -26,21 +26,21 @@
 import javax.resource.spi.ConnectionRequestInfo;
 import javax.security.auth.Subject;
 
-import junit.framework.TestCase;
 
 import org.easymock.classextension.EasyMock;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class ManagedConnectionImplTest extends TestCase {
+public class ManagedConnectionImplTest extends Assert {
     private DummyManagedConnectionImpl mc;
-
-    public ManagedConnectionImplTest(String arg0) {
-        super(arg0);
-    }
-
+    
+    @Before
     public void setUp() throws Exception {
         mc = new DummyManagedConnectionImpl(null, null, null);
     }
 
+    @Test
     public void testGetSetLogWriter() throws Exception {
         PrintWriter writer = EasyMock.createMock(PrintWriter.class);
         mc.setLogWriter(writer);
@@ -53,10 +53,12 @@
 
     }
 
+    @Test
     public void testSetNullLogWriterOk() throws Exception {
         mc.setLogWriter(null);
     }
 
+    @Test
     public void testRemoveConnectionEventListener() throws Exception {
         ConnectionEvent event = new ConnectionEvent(mc, ConnectionEvent.CONNECTION_ERROR_OCCURRED);
 
@@ -73,10 +75,12 @@
 
     }
 
+    @Test
     public void testCleanupDoesNothing() throws Exception {
         mc.cleanup();
     }
 
+    @Test
     public void testGetMetaData() throws Exception {
         try {
             mc.getMetaData();
@@ -86,12 +90,14 @@
         }
     }
 
+    @Test
     public void testGetSetSubject() {
         Subject s = new Subject();
         mc.setSubject(s);
         assertEquals("got back what we set", s, mc.getSubject());
     }
 
+    @Test
     public void testGetSetConnectionRequestInfo() {
         ConnectionRequestInfo ri = new ConnectionRequestInfo() {
         };
@@ -100,6 +106,7 @@
         assertEquals("got back what we set", ri, mc.getConnectionRequestInfo());
     }
 
+    @Test
     public void testClose() throws Exception {
         final Object o = new Object();
         ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
@@ -111,16 +118,18 @@
         EasyMock.verify(listener);
     }
 
+    @Test
     public void testError() throws Exception {
         ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
         mc.addConnectionEventListener(listener);
         listener.connectionErrorOccurred(EasyMock.isA(ConnectionEvent.class));
         EasyMock.expectLastCall();
         EasyMock.replay(listener);
-        mc.error(new Exception(getName()));
+        mc.error(new Exception());
         EasyMock.verify(listener);
     }
 
+    @Test
     public void testSendEventError() throws Exception {
         ConnectionEvent event = new ConnectionEvent(mc, ConnectionEvent.CONNECTION_ERROR_OCCURRED);
         ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
@@ -132,6 +141,7 @@
         EasyMock.verify(listener);
     }
 
+    @Test
     public void testSendEventTxStarted() throws Exception {
         ConnectionEvent event = new ConnectionEvent(mc, ConnectionEvent.LOCAL_TRANSACTION_STARTED);
         ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
@@ -143,6 +153,7 @@
         EasyMock.verify(listener);
     }
 
+    @Test
     public void testSendEventTxCommitted() throws Exception {
         ConnectionEvent event = new ConnectionEvent(mc, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED);
         ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);
@@ -154,6 +165,7 @@
         EasyMock.verify(listener);
     }
 
+    @Test
     public void testSendEventTxRolledBack() throws Exception {
         ConnectionEvent event = new ConnectionEvent(mc, ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK);
         ConnectionEventListener listener = EasyMock.createMock(ConnectionEventListener.class);

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceAdapterInternalExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceAdapterInternalExceptionTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceAdapterInternalExceptionTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceAdapterInternalExceptionTest.java Tue Jun 12 01:08:04 2007
@@ -21,32 +21,29 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class ResourceAdapterInternalExceptionTest extends TestCase {
+
+public class ResourceAdapterInternalExceptionTest extends Assert {
     private static final Logger EXCEPTION_LOGGER = 
         Logger.getLogger(ResourceAdapterInternalException.class.getName());
     private Level logLevel;  
 
-    public ResourceAdapterInternalExceptionTest(String name) {
-        super(name);
-    }
-
-    public static Test suite() {
-        return new TestSuite(ResourceAdapterInternalExceptionTest.class);        
-    }
-    
+    @Before    
     public void setUp() throws Exception { 
         logLevel = EXCEPTION_LOGGER.getLevel();
         EXCEPTION_LOGGER.setLevel(Level.SEVERE);
     } 
     
+    @After
     public void tearDown() throws Exception {
         EXCEPTION_LOGGER.setLevel(logLevel);
     }
     
+    @Test
     public void testMessage() {
         final String msg = "msg1";
         msg.intern();
@@ -57,6 +54,7 @@
         assertEquals(e.getMessage(), msg);
     }
 
+    @Test
     public void testMessageWithNullTx() {
         final String msg = "msg1";
         msg.intern();
@@ -69,6 +67,7 @@
         assertNull(e.getCause());        
     }
 
+    @Test
     public void testMessageWithEx() throws Exception {
         final String msg = "msg";
         final String causeMsg = "cause";
@@ -83,6 +82,7 @@
         assertEquals(e.getCause(), cause);
     }
 
+    @Test
     public void testMessageWithThrowable() throws Exception {
         final String msg = "msg";
         final String causeMsg = "cause";
@@ -97,6 +97,7 @@
 
     }
 
+    @Test
     public void testMessageWithIteEx() throws Exception {
         final String msg = "msg";
         final String causeMsg = "cause";
@@ -114,6 +115,7 @@
         assertEquals(re.getCause(), cause);
     }
 
+    @Test
     public void testMessageWithIteErroriNotThrow() throws Exception {
         final String msg = "msg";
         final String causeMsg = "cause";
@@ -126,22 +128,25 @@
         assertEquals(re.getCause(), cause);
     }
 
-    /*
+    
+    /*@Ignore
     public void testGetLinkedExceptionReturnNullIfNoCause() throws Exception {
         ResourceAdapterInternalException re = new ResourceAdapterInternalException("ex");
         assertNull("getLinkedException return null", re.getLinkedException());
     }
 
+    @Ignore
     public void testGetLinkedExceptionReturnNullIfCauseIsError() throws Exception {
         java.lang.Throwable cause = new java.lang.UnknownError("error");
         ResourceAdapterInternalException re = new ResourceAdapterInternalException("ex", cause);
         assertNull("getLinkedException return null", re.getLinkedException());
     }
 
+    @Ignore
     public void testGetLinkedExceptionReturnNotNullIfCauseIsException() throws Exception {
         java.lang.Throwable cause = new RuntimeException("runtime exception");
         ResourceAdapterInternalException re = new ResourceAdapterInternalException("ex", cause);
         assertEquals("get same exception", cause, re.getLinkedException());
-    }
-    */
+    }*/
+    
 }

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceBeanTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceBeanTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceBeanTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceBeanTest.java Tue Jun 12 01:08:04 2007
@@ -18,16 +18,15 @@
  */
 package org.apache.cxf.jca.core.resourceadapter;
 
+import org.junit.Assert;
+import org.junit.Test;
 
-import junit.framework.TestCase;
 
-public class ResourceBeanTest extends TestCase {
 
-    public ResourceBeanTest(String name) {
-        super(name);
-    }
+public class ResourceBeanTest extends Assert {
 
- 
+
+    @Test
     public void testDisableConsoleLogging() throws Exception {
         ResourceBean rb = new ResourceBean();
         rb.setDisableConsoleLogging(true);

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/UriHandlerInitTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/UriHandlerInitTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/UriHandlerInitTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/UriHandlerInitTest.java Tue Jun 12 01:08:04 2007
@@ -20,19 +20,16 @@
 
 import java.util.Properties;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class UriHandlerInitTest extends TestCase {
+
+public class UriHandlerInitTest extends Assert {
     private static final String PROP_NAME = "java.protocol.handler.pkgs";
 
     private static final String PKG_ADD = "do.do";
     
-    public UriHandlerInitTest(String name) {
-        super(name);
-    }
-
+    @Test
     public void testAppendToProp() {
         final Properties properties = System.getProperties();
         final String origVal = properties.getProperty(PROP_NAME);
@@ -58,8 +55,6 @@
 
    
 
-    public static Test suite() {
-        return new TestSuite(UriHandlerInitTest.class);
-    }
+    
    
 }

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImplTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImplTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/AssociatedManagedConnectionFactoryImplTest.java Tue Jun 12 01:08:04 2007
@@ -26,20 +26,16 @@
 //import javax.resource.spi.ConnectionManager;
 import javax.resource.spi.ResourceAdapter;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 import org.apache.cxf.Bus;
 //import org.apache.cxf.jca.cxf.test.DummyBus;
 import org.easymock.classextension.EasyMock;
+import org.junit.Test;
 
 public class AssociatedManagedConnectionFactoryImplTest extends ManagedConnectionFactoryImplTest {
     
-    public AssociatedManagedConnectionFactoryImplTest(String name) {
-        super(name);
-    }
-
+    
+    @Test
     public void testSetResourceAdapter() throws Exception {
         TestableAssociatedManagedConnectionFactoryImpl mci = 
             new TestableAssociatedManagedConnectionFactoryImpl();
@@ -48,6 +44,7 @@
         assertEquals("ResourceAdapter is set", mci.getResourceAdapter(), rai);
     }
 
+    @Test
     public void testSetWrongResourceAdapterThrowException() throws Exception {
         TestableAssociatedManagedConnectionFactoryImpl mci =
             new TestableAssociatedManagedConnectionFactoryImpl();
@@ -60,6 +57,7 @@
         }
     }
 
+    @Test
     public void testRegisterBusThrowExceptionIfResourceAdapterNotSet() throws Exception {
         TestableAssociatedManagedConnectionFactoryImpl mci =
             new TestableAssociatedManagedConnectionFactoryImpl();
@@ -99,6 +97,7 @@
         }
     }
     */
+    @Test
     public void testMergeNonDuplicateResourceAdapterProps() throws ResourceException {
         Properties props = new Properties();
         props.setProperty("key1", "value1");
@@ -128,13 +127,7 @@
         return mci;
     }
 
-    public static Test suite() {
-        return new TestSuite(AssociatedManagedConnectionFactoryImplTest.class);
-    }
 
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {AssociatedManagedConnectionFactoryImplTest.class.getName()});
-    }
 }
 
 class DummyResourceAdapterImpl extends ResourceAdapterImpl {

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/CXFConnectionRequestInfoTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/CXFConnectionRequestInfoTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/CXFConnectionRequestInfoTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/CXFConnectionRequestInfoTest.java Tue Jun 12 01:08:04 2007
@@ -22,17 +22,14 @@
 
 import javax.xml.namespace.QName;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class CXFConnectionRequestInfoTest extends TestCase {
 
-    public CXFConnectionRequestInfoTest(String name) {
-        super(name);
-    }
+public class CXFConnectionRequestInfoTest extends Assert {
 
+    
+    @Test
     public void testCXFConnectionRequestInfoEquals() throws Exception {
 
         CXFConnectionRequestInfo cr1 = new CXFConnectionRequestInfo(Foo.class,
@@ -92,11 +89,5 @@
 
     }
 
-    public static Test suite() {
-        return new TestSuite(CXFConnectionRequestInfoTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {CXFConnectionRequestInfoTest.class.getName()});
-    }
+    
 }

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ConnectionFactoryImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ConnectionFactoryImplTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ConnectionFactoryImplTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ConnectionFactoryImplTest.java Tue Jun 12 01:08:04 2007
@@ -30,33 +30,32 @@
 import javax.resource.spi.ManagedConnectionFactory;
 import javax.xml.namespace.QName;
 
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
+
 
 import org.easymock.classextension.EasyMock;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class ConnectionFactoryImplTest extends TestCase {
+public class ConnectionFactoryImplTest extends Assert {
     ManagedConnectionFactory mockConnectionFactory;
 
     ConnectionManager mockConnectionManager;
 
-    public ConnectionFactoryImplTest(String name) {
-        super(name);
-    }
-
+    @Before
     public void setUp() throws Exception {
         mockConnectionFactory = EasyMock.createMock(ManagedConnectionFactory.class);
         mockConnectionManager = EasyMock.createMock(ConnectionManager.class);
     }
 
+    @Test
     public void testInstanceOfSerializable() throws Exception {
         ConnectionFactoryImpl cf = new ConnectionFactoryImpl(mockConnectionFactory,
                                                              mockConnectionManager);
         assertTrue("instance of serializable", cf instanceof Serializable);
     }
 
+    @Test
     public void testInstanceOfReferencable() throws Exception {
         ConnectionFactoryImpl cf = new ConnectionFactoryImpl(mockConnectionFactory,
                                                              mockConnectionManager);
@@ -68,6 +67,7 @@
         assertEquals("got back what was set", ref, cf.getReference());
     }
 
+    @Test
     public void testGetConnectionReturnsConnectionWithRightManager() throws Exception {
         EasyMock.reset(mockConnectionManager);
         
@@ -92,6 +92,7 @@
         EasyMock.verify(mockConnectionManager); 
     }
 
+    @Test
     public void testGetConnectionWithNoPortReturnsConnectionWithRightManager() throws Exception {
         
         EasyMock.reset(mockConnectionManager);
@@ -120,6 +121,7 @@
         
     }
 
+    @Test
     public void testGetConnectionWithNoWsdlLocationReturnsConnectionWithRightManager() throws Exception {
         
         EasyMock.reset(mockConnectionManager);
@@ -146,6 +148,7 @@
         
     }
 
+    @Test
     public void testGetConnectionWithNoWsdlLocationAndNoPortReturnsConnectionWithRightManager()
         throws Exception {
         EasyMock.reset(mockConnectionManager);
@@ -171,6 +174,7 @@
 
     }
 
+    @Test
     public void testGetConnectionWithNonInterface() throws Exception {
         ConnectionFactoryImpl cf = new ConnectionFactoryImpl(mockConnectionFactory,
                                                              mockConnectionManager);
@@ -183,11 +187,6 @@
         }
     }
 
-    public static Test suite() {
-        return new TestSuite(ConnectionFactoryImplTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {ConnectionFactoryImplTest.class.getName()});
-    }
+    
+    
 }

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImplTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImplTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionFactoryImplTest.java Tue Jun 12 01:08:04 2007
@@ -31,20 +31,18 @@
 import javax.security.auth.Subject;
 import javax.xml.namespace.QName;
 
-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.BusFactory;
 import org.apache.cxf.connector.CXFConnectionFactory;
 import org.apache.hello_world_soap_http.Greeter;
 import org.easymock.classextension.EasyMock;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 
-public class ManagedConnectionFactoryImplTest extends TestCase {
+public class ManagedConnectionFactoryImplTest extends Assert {
 
     protected ManagedConnectionFactoryImpl mci;
 
@@ -54,10 +52,8 @@
 
     protected CXFConnectionRequestInfo cri3;
 
-    public ManagedConnectionFactoryImplTest(String name) {
-        super(name);
-    }
 
+    @Before
     public void setUp() throws Exception {
         
         mci = createManagedConnectionFactoryImpl();
@@ -77,6 +73,7 @@
                                               new QName("fooPort3"));
     }
 
+    @Test
     public void testSetConfigurationDomain() throws Exception {
         final String domainName = "SomeDomain";
         Properties p = new Properties();
@@ -87,12 +84,14 @@
         assertEquals(domainName, mcf.getConfigurationDomain());
     }
 
+    @Test
     public void testGetConfigurationDomainReturnsDefaultValue() throws Exception {
         Properties p = new Properties();
         ManagedConnectionFactoryImpl mcf = new ManagedConnectionFactoryImpl(p);
         assertEquals(ManagedConnectionFactoryImpl.CONFIG_DOMAIN, mcf.getConfigurationDomain());
     }
 
+    @Test
     public void testSetConfigurationScope() throws Exception {
         final String name = "a.b.c";
         Properties p = new Properties();
@@ -103,13 +102,15 @@
         assertEquals(name, mcf.getConfigurationScope());
     }
 
+    @Test
     public void testGetConfigurationScopeReturnsDefaultValue() throws Exception {
         Properties p = new Properties();
         ManagedConnectionFactoryImpl mcf = new ManagedConnectionFactoryImpl(p);
         assertEquals(ManagedConnectionFactoryImpl.CONFIG_SCOPE, mcf.getConfigurationScope());
     }
 
-   
+
+    @Test
     public void testSetEJBServicePropertiesURL() throws Exception {
         final String name = "file://foo.txt";
         Properties p = new Properties();
@@ -120,6 +121,7 @@
         assertEquals(name, mcf.getEJBServicePropertiesURL());
     }
 
+    @Test
     public void testSetMonitorEJBServiceProperties() throws Exception {
         final Boolean value = Boolean.TRUE;
         Properties p = new Properties();
@@ -130,6 +132,7 @@
         assertEquals(value, mcf.getMonitorEJBServiceProperties());
     }
 
+    @Test
     public void testSetEJBServicePropertiesPollInterval() throws Exception {
         final Integer value = new Integer(10);
         Properties p = new Properties();
@@ -140,7 +143,8 @@
         assertEquals(value, mcf.getEJBServicePropertiesPollInterval());
     }
 
-    
+
+    @Test
     public void testSetLogLevelSetsLevelOnPlugin() throws Exception {
         Properties props = new Properties();
         ManagedConnectionFactoryImpl propsmcf = new ManagedConnectionFactoryImpl(props);
@@ -151,6 +155,7 @@
     }
   
 
+    @Test
     public void testGetPropsURLFromBadURL() throws Exception {
         try {
             ManagedConnectionFactoryImpl mcf = new ManagedConnectionFactoryImpl();
@@ -165,6 +170,7 @@
         }
     }
 
+    @Test
     public void testImplementsEqualsAndHashCode() throws Exception {
         Method equalMethod = mci.getClass().getMethod("equals", new Class[] {Object.class});
         Method hashCodeMethod = mci.getClass().getMethod("hashCode", (Class[])null);
@@ -178,6 +184,7 @@
         assertTrue("not equal with another thing", !mci.equals(this));
     }
 
+    @Test
     public void testMatchManagedConnectionsWithUnboundConnection() throws Exception {
         mci = new ManagedConnectionFactoryImplTester();
         Object unboundMC = mci.createManagedConnection(null, null);
@@ -188,6 +195,7 @@
                    mci.matchManagedConnections(mcSet, null, cri), unboundMC);
     }
 
+    @Test
     public void testMatchManagedConnectionsWithBoundConnections() throws Exception {
 
     
@@ -225,11 +233,13 @@
         bus.shutdown(true);
     }
 
+    @Test
     public void testValidateConnection() throws Exception {
         // call the no action method
         mci.validateReference(null, null);
     }
 
+    @Test
     public void testCreateConnectionFactoryNoArgsThrowsNotSupported() throws Exception {
         try {
             mci.createConnectionFactory();
@@ -239,6 +249,7 @@
         }
     }
 
+    @Test
     public void testCreateConnectionFactoryNullCMThrows() throws Exception {
         try {
             mci.createConnectionFactory(null);
@@ -248,6 +259,7 @@
         }
     }
 
+    @Test
     public void testCreateConnectionFactoryCM() throws Exception {
         ManagedConnectionFactoryImplTester mcit = new ManagedConnectionFactoryImplTester();
         ConnectionManager connManager = EasyMock.createMock(ConnectionManager.class);
@@ -256,6 +268,7 @@
         assertEquals("init was called once", 1, mcit.initCalledCount);
     }
 
+    @Test
     public void testCreateManagedConnection() throws Exception {
         ManagedConnectionFactoryImplTester mcit = new ManagedConnectionFactoryImplTester();
         assertTrue("We get a ManagedConnection back",
@@ -263,6 +276,7 @@
         assertEquals("init was called once", 1, mcit.initCalledCount);
     }
 
+    @Test
     public void testCloseDoesNothing() throws Exception {
         mci.close();
     }
@@ -328,13 +342,7 @@
         return new ManagedConnectionFactoryImpl();
     }
 
-    public static Test suite() {
-        return new TestSuite(ManagedConnectionFactoryImplTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {ManagedConnectionFactoryImplTest.class.getName()});
-    }
+    
 }
 
 class ManagedConnectionFactoryImplTester extends ManagedConnectionFactoryImpl {

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionImplTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionImplTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionImplTest.java Tue Jun 12 01:08:04 2007
@@ -30,15 +30,13 @@
 import javax.security.auth.Subject;
 import javax.xml.namespace.QName;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
 
 import org.apache.cxf.connector.Connection;
 import org.apache.cxf.jca.cxf.handlers.ProxyInvocationHandler;
 import org.apache.hello_world_soap_http.Greeter;
 import org.easymock.classextension.EasyMock;
+import org.junit.Ignore;
+import org.junit.Test;
 
 public class ManagedConnectionImplTest extends ManagedConnectionTestBase {
 
@@ -46,26 +44,14 @@
     protected QName serviceName;
     protected QName portName;
 
-    public ManagedConnectionImplTest(String name) {
-        super(name);
-    }
-
-    /*
-    public void setUp() {
-        subj = new Subject();
-        wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
-        serviceName = new QName("http://apache.org/hello_world_soap_http", "SOAPService");
-        portName = new QName("http://apache.org/hello_world_soap_http", "SoapPort");
-        cri = new CXFConnectionRequestInfo(Greeter.class, wsdl, serviceName, portName);
-    }
-    */
-   
+    @Test   
     public void testInstanceOfConnection() throws Exception {
         assertTrue("instance of Connection", mci instanceof Connection);
         ((Connection)mci).close();
     }
 
-    public void untestGetConnectionServiceGetPortThrows() throws Exception {
+    @Ignore
+    public void testGetConnectionServiceGetPortThrows() throws Exception {
         
         cri = new CXFConnectionRequestInfo(Foo.class, null, serviceName, null);
         
@@ -78,15 +64,17 @@
         }
     }
 
-    /*
+    
+    @Ignore
     public void testThreadContextClassLoaderIsSet() throws Exception {
         //set the threadContextClassLoader for Bus 
         //TODO njiang classloader things
         //check the threadContextClassLoader 
         mci.getConnection(subj, cri);
     }
-    */
-    public void untestGetConnectionWithNoWSDLInvokesCreateClientWithTwoParameters() throws Exception {
+    
+    @Ignore
+    public void testGetConnectionWithNoWSDLInvokesCreateClientWithTwoParameters() throws Exception {
 
 
         cri = new CXFConnectionRequestInfo(Greeter.class, null, serviceName, portName);
@@ -97,7 +85,8 @@
         assertTrue("checking implementation of passed interface", o instanceof Greeter);
     }
     
-    public void untestGetConnectionWithNoWSDLInvokesCreateClientWithTwoArgs()
+    @Ignore
+    public void testGetConnectionWithNoWSDLInvokesCreateClientWithTwoArgs()
         throws Exception {
 
         cri = new CXFConnectionRequestInfo(Greeter.class, null, serviceName, null);
@@ -110,7 +99,8 @@
 
     }
 
-    public void untestGetConnectionWithNoPortReturnsConnection() throws Exception {
+    @Ignore
+    public void testGetConnectionWithNoPortReturnsConnection() throws Exception {
 
         cri = new CXFConnectionRequestInfo(Greeter.class, 
                                            wsdl,
@@ -123,6 +113,7 @@
         assertTrue("returned connect does not implement Connection interface", o instanceof Greeter);
     }
 
+    @Test
     public void testGetConnectionReturnsConnection() throws ResourceException {
         Object o = mci.getConnection(subj, cri);
         assertTrue("returned connect does not implement Connection interface", o instanceof Connection);
@@ -137,12 +128,14 @@
                      Proxy.getInvocationHandler(o).getClass());
     }
 
+    @Test
     public void testGetConnectionWithDudSubjectA() throws ResourceException {
         Object o = mci.getConnection(subj, cri);
 
         verifyProxyInterceptors(o);
     }
 
+    @Test
     public void testGetConnectionWithDudSubjectB() throws ResourceException {
         String user = new String("user");
         char password[] = {'a', 'b', 'c'};
@@ -153,6 +146,7 @@
         verifyProxyInterceptors(o);
     }
 
+    @Test
     public void testGetConnectionWithSubject() throws ResourceException {
         String user = new String("user");
         char password[] = {'a', 'b', 'c'};
@@ -165,6 +159,7 @@
     }
  
 
+    @Test
     public void testCloseConnection() throws Exception {
       
         final Connection conn = (Connection)mci.getConnection(subj, cri);
@@ -175,6 +170,7 @@
         conn.close();
     }
 
+    @Test
     public void testAssociateConnection() throws Exception {
 
         // Create the additional ManagedConnectionImpl ..
@@ -211,6 +207,7 @@
 
     }
 
+    @Test
     public void testAssociateConnectionThrowsException() throws Throwable {
 
         
@@ -229,6 +226,7 @@
 
     }
 
+    @Test
     public void testGetMetaData() throws Exception {
         try {
             mci.getMetaData();
@@ -238,11 +236,4 @@
         }
     }
   
-    public static Test suite() {
-        return new TestSuite(ManagedConnectionImplTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {ManagedConnectionImplTest.class.getName()});
-    }
 }

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionTestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionTestBase.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionTestBase.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionTestBase.java Tue Jun 12 01:08:04 2007
@@ -26,7 +26,6 @@
 import javax.security.auth.Subject;
 import javax.xml.namespace.QName;
 
-import junit.framework.TestCase;
 
 
 import org.apache.cxf.Bus;
@@ -34,9 +33,11 @@
 import org.apache.cxf.BusFactory;
 import org.apache.hello_world_soap_http.Greeter;
 import org.easymock.classextension.EasyMock;
+import org.junit.Assert;
+import org.junit.Before;
 
 
-public abstract class ManagedConnectionTestBase extends TestCase {
+public abstract class ManagedConnectionTestBase extends Assert {
     protected Subject subj;
 
     protected CXFConnectionRequestInfo cri;
@@ -54,10 +55,11 @@
     protected ConnectionEventListener mockListener = 
         EasyMock.createMock(ConnectionEventListener.class);
     
-    public ManagedConnectionTestBase(String name) {
-        super(name);
+    public ManagedConnectionTestBase() {
+        
     }
     
+    @Before
     public void setUp() throws ResourceException, MalformedURLException, BusException {
                
         subj = new Subject();

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ResourceAdapterImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ResourceAdapterImplTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ResourceAdapterImplTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ResourceAdapterImplTest.java Tue Jun 12 01:08:04 2007
@@ -30,22 +30,21 @@
 import javax.resource.spi.BootstrapContext;
 import javax.resource.spi.ResourceAdapter;
 
-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.core.resourceadapter.ResourceBean;
 import org.easymock.classextension.EasyMock;
+import org.junit.Assert;
+import org.junit.Test;
 
 
-public class ResourceAdapterImplTest extends TestCase {
+public class ResourceAdapterImplTest extends Assert {
 
-    public ResourceAdapterImplTest(String name) {
-        super(name);
+    public ResourceAdapterImplTest() {
+        
     }
 
+    @Test
     public void testConstructorWithoutProperties() throws Exception {
         ResourceAdapterImpl rai = new ResourceAdapterImpl();
         assertTrue("constructed without props", rai instanceof ResourceAdapterImpl);
@@ -54,6 +53,7 @@
         assertTrue("constructed without props", rai instanceof Serializable);
     }
 
+    @Test
     public void testConstructorWithProperties() throws Exception {
         Properties props = new Properties();
         ResourceAdapterImpl rai = new ResourceAdapterImpl(props);
@@ -63,6 +63,7 @@
         assertTrue("constructed with props", rai instanceof Serializable);
     }
 
+    @Test
     public void testSerializability() throws Exception {
         final String key = "key";
         final String value = "value";
@@ -92,6 +93,7 @@
             .getProperty(key));
     }
 
+    @Test
     public void testRegisterBusOfNull() throws Exception {
         ResourceAdapterImpl rai = new ResourceAdapterImpl();
         rai.registerBus(null);
@@ -99,6 +101,7 @@
         assertTrue("bus null registered", rai.getBusCache().contains(null));
     }
 
+    @Test
     public void testRegisterBusNotNull() throws Exception {
         ResourceAdapterImpl rai = new ResourceAdapterImpl();
         Bus bus = EasyMock.createMock(Bus.class);
@@ -107,6 +110,7 @@
         assertTrue("bus registered", rai.getBusCache().contains(bus));
     }
 
+    @Test
     public void testStartWithNullBootstrapContextThrowException() throws Exception {
         ResourceAdapterImpl rai = new ResourceAdapterImpl();
         try {
@@ -119,6 +123,7 @@
         }
     }
 
+    @Test
     public void testGetCorrectBootstrapContext() throws Exception {
         ResourceAdapterImpl rai = new ResourceAdapterImpl();
         BootstrapContext bc = EasyMock.createMock(BootstrapContext.class);
@@ -127,6 +132,7 @@
         assertEquals("BootstrapContext set", rai.getBootstrapContext(), bc);
     }
 
+    @Test
     public void testStopWithEmptyBusCache() throws Exception {
         ResourceAdapterImpl rai = new ResourceAdapterImpl();
         rai.setBusCache(new HashSet<Bus>());
@@ -139,6 +145,7 @@
         }
     }
 
+    @Test
     public void testStopWithNonEmptyBusCache() throws Exception {
         ResourceAdapterImpl rai = new ResourceAdapterImpl();
         rai.setBusCache(new HashSet<Bus>());
@@ -151,11 +158,5 @@
         EasyMock.verify(bus);
     }
 
-    public static Test suite() {
-        return new TestSuite(ResourceAdapterImplTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {ResourceAdapterImplTest.class.getName()});
-    }
+    
 }

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/AbstractInvocationHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/AbstractInvocationHandlerTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/AbstractInvocationHandlerTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/AbstractInvocationHandlerTest.java Tue Jun 12 01:08:04 2007
@@ -21,15 +21,20 @@
 
 import org.apache.cxf.jca.cxf.CXFInvocationHandler;
 import org.apache.cxf.jca.cxf.CXFManagedConnectionFactory;
+import org.junit.Test;
 
 public abstract class AbstractInvocationHandlerTest 
     extends HandlerTestBase {
     
+    public AbstractInvocationHandlerTest() {
+     
+    }
     public AbstractInvocationHandlerTest(String name) {
         super(name);
     }
 
     // seach for the setNext method
+    @Test
     public void testHandlerInvokesNext() throws Throwable {
         Object[] args = new Object[0];
                 
@@ -41,6 +46,7 @@
         assertTrue("target object must not be called", !target.methodInvoked);
     }
 
+    @Test
     public void testTargetAttribute() {
 
         CXFInvocationHandler handler = getHandler();
@@ -49,6 +55,7 @@
                    target, handler.getData().getTarget());
     }
 
+    @Test
     public void testBusAttribute() {
 
         CXFInvocationHandler handler = getHandler();
@@ -56,6 +63,7 @@
         assertSame("bus must be retrievable after set", mockBus, handler.getData().getBus());
     }
 
+    @Test
     public void testManagedConnectionAttribute() {
 
         CXFInvocationHandler handler = getHandler();

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/HandlerTestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/HandlerTestBase.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/HandlerTestBase.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/HandlerTestBase.java Tue Jun 12 01:08:04 2007
@@ -20,16 +20,17 @@
 
 import java.lang.reflect.Method;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.Bus;
 import org.apache.cxf.jca.cxf.CXFInvocationHandler;
 import org.apache.cxf.jca.cxf.CXFManagedConnection;
 import org.apache.cxf.jca.cxf.ManagedConnectionFactoryImpl;
 import org.apache.cxf.jca.cxf.ManagedConnectionImpl;
 import org.easymock.classextension.EasyMock;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
-public class HandlerTestBase extends TestCase {
+public class HandlerTestBase extends Assert {
     protected Bus mockBus = EasyMock.createMock(Bus.class);
     protected CXFManagedConnection mockManagedConnection = 
                 EasyMock.createMock(CXFManagedConnection.class);
@@ -44,10 +45,14 @@
     protected Method testMethod;
     protected TestTarget target = new TestTarget();
     
+    public HandlerTestBase() {
+    }
+    
     public HandlerTestBase(String aName) {
-        super(aName);
+        
     }
 
+    @Before
     public void setUp() {
         EasyMock.reset(mcf);
         EasyMock.reset(mci);
@@ -67,6 +72,7 @@
         
     }
 
+    @Test
     public void testNullTestTarget() {
        // do nothing here ,just for avoid the junit test warning
     }

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java Tue Jun 12 01:08:04 2007
@@ -24,18 +24,21 @@
 import javax.resource.spi.ResourceAdapterInternalException;
 import javax.security.auth.Subject;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 import org.apache.cxf.jca.cxf.CXFInvocationHandler;
+import org.junit.Test;
 
 public class InvocationHandlerFactoryTest extends HandlerTestBase {
     
+    public InvocationHandlerFactoryTest() {
+        super();
+    }
+    
     public InvocationHandlerFactoryTest(String name) {
         super(name);
     }
     
+    @Test
     public void testCreateHandlerChain() 
         throws ResourceAdapterInternalException {
 
@@ -86,11 +89,5 @@
 
     
 
-    public static Test suite() {
-        return new TestSuite(InvocationHandlerFactoryTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {InvocationHandlerFactoryTest.class.getName()});
-    }
+    
 }

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java Tue Jun 12 01:08:04 2007
@@ -20,12 +20,11 @@
 
 import java.lang.reflect.Proxy;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 import org.apache.cxf.jca.cxf.CXFInvocationHandler;
 import org.apache.cxf.jca.cxf.CXFInvocationHandlerData;
+import org.junit.Before;
+import org.junit.Test;
 
 public class InvokingInvocationHandlerTest 
     extends AbstractInvocationHandlerTest {
@@ -40,6 +39,10 @@
         super(name);
     }
     
+    public InvokingInvocationHandlerTest() {
+        super();
+    }
+    @Before
     public void setUp() {
         super.setUp();
         target = new TestTarget();
@@ -63,12 +66,14 @@
      * override this test - this handler is alway the last in the chain and is
      * responsible for delegating the invocation to the target object
      */
+    @Test
     public void testHandlerInvokesNext() throws Throwable {
         assertTrue("target method  must not have be called", !target.methodInvoked);
         handler.invoke(target, testMethod, new Object[0]);
         assertTrue("target method must be called", target.methodInvoked);
     }
 
+    @Test
     public void testInvocationThroughProxy() throws IllegalArgumentException {
 
         assertTrue("target object must no have been invoked", !target.methodInvoked);
@@ -81,11 +86,5 @@
         return handler;
     }
 
-    public static Test suite() {
-        return new TestSuite(InvokingInvocationHandlerTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {InvokingInvocationHandlerTest.class.getName()});
-    }
+    
 }

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ObjectMethodInvocationHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ObjectMethodInvocationHandlerTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ObjectMethodInvocationHandlerTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ObjectMethodInvocationHandlerTest.java Tue Jun 12 01:08:04 2007
@@ -23,6 +23,9 @@
 
 import org.apache.cxf.jca.cxf.CXFInvocationHandler;
 import org.apache.cxf.jca.cxf.CXFInvocationHandlerData;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
 
 
 
@@ -34,11 +37,14 @@
     TestTarget testTarget = new TestTarget(); 
     DummyHandler dummyHandler = new DummyHandler();
     
+    public ObjectMethodInvocationHandlerTest() {
+        super();
+    }
     public ObjectMethodInvocationHandlerTest(String name) {
         super(name);
     }
 
-
+    @Before
     public void setUp() { 
         super.setUp(); 
         target.lastMethod = null; 
@@ -49,7 +55,7 @@
         handler.setNext((CXFInvocationHandler)dummyHandler); 
     } 
 
-    
+    @Test
     public void testToString() throws Throwable  { 
 
         Method toString = Object.class.getMethod("toString", new Class[0]); 
@@ -60,14 +66,14 @@
         assertTrue("checking toString method ", ((String)result).startsWith("ConnectionHandle"));
     } 
 
-
-    public void xtestHashCode() throws Throwable { 
+    @Ignore
+    public void testHashCode() throws Throwable { 
 
         Method hashCode = Object.class.getMethod("hashCode", new Class[0]); 
         doObjectMethodTest(hashCode); 
     } 
 
-    
+    @Test
     public void testEqualsDoesNotCallNext() throws Throwable { 
 
         Method equals = Object.class.getMethod("equals", new Class[] {Object.class}); 
@@ -75,7 +81,8 @@
         assertTrue("object method must not be passed to next handler in chain", 
                    !dummyHandler.invokeCalled); 
     } 
-
+    
+    @Test
     public void testNonObjecMethod() throws Throwable { 
 
         DummyHandler dummyHandler1 = new DummyHandler(); 
@@ -88,7 +95,7 @@
         assertTrue("non object method must be passed to next handler in chain", dummyHandler1.invokeCalled); 
     }
 
-
+    @Test
     public void testEqualsThroughProxies() { 
 
         Class[] interfaces = {TestInterface.class};

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java?view=diff&rev=546410&r1=546409&r2=546410
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java (original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java Tue Jun 12 01:08:04 2007
@@ -18,16 +18,13 @@
  */
 package org.apache.cxf.jca.cxf.handlers;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-
-//import org.apache.cxf.Bus;
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.jca.cxf.CXFInvocationHandler;
 import org.apache.cxf.jca.cxf.CXFInvocationHandlerData;
 import org.apache.cxf.jca.cxf.CXFManagedConnection;
+import org.junit.Before;
+import org.junit.Test;
 
 
 public class  ProxyInvocationHandlerTest extends AbstractInvocationHandlerTest {
@@ -35,11 +32,15 @@
     ProxyInvocationHandler testObject;
     CXFInvocationHandlerData data;
 
+    public ProxyInvocationHandlerTest() {
+        super();
+    }
+    
     public ProxyInvocationHandlerTest(String name) {
         super(name);
     }
 
-
+    @Before
     public void setUp() { 
         super.setUp(); 
         data = new CXFInvocationHandlerDataImpl();
@@ -54,6 +55,7 @@
     }
 
    
+    @Test
     public void testInvokeSetsBusCurrent() throws Throwable {
         Bus oldBus = BusFactory.getDefaultBus();
         
@@ -66,13 +68,6 @@
         BusFactory.setDefaultBus(oldBus);
     }
 
-    public static Test suite() {
-        return new TestSuite(ProxyInvocationHandlerTest.class);
-    }
-
-    public static void main(String[] args) {
-        TestRunner.main(new String[] {ProxyInvocationHandlerTest.class.getName()});
-    }
 }
 
 



Mime
View raw message