cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r523244 - in /incubator/cxf/trunk: api/src/test/java/org/apache/cxf/ws/policy/builder/jaxb/ api/src/test/java/org/apache/cxf/ws/policy/builder/primitive/ rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/ rt/ws/policy/src/test/java/org/ap...
Date Wed, 28 Mar 2007 09:24:36 GMT
Author: andreasmyth
Date: Wed Mar 28 02:24:34 2007
New Revision: 523244

URL: http://svn.apache.org/viewvc?view=rev&rev=523244
Log:
junit 4 transition for rm and policy tests

Modified:
    incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilderTest.java
    incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionTest.java
    incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionBuilderTest.java
    incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImplTest.java
    incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyRegistryImplTest.java
    incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractEndpointTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractRMInterceptorTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractSequenceTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationSequenceTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMContextUtilsTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMInInterceptorTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMOutInterceptorTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/SourceSequenceTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/policy/PolicyUtilsTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptorTest.java
    incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImplTest.java

Modified: incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilderTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilderTest.java
(original)
+++ incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilderTest.java
Wed Mar 28 02:24:34 2007
@@ -26,17 +26,18 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.test.assertions.foo.FooType;
 import org.apache.neethi.Assertion;
+import org.junit.Assert;
+import org.junit.Test;
 
 /**
  * 
  */
-public class JaxbAssertionBuilderTest extends TestCase {
+public class JaxbAssertionBuilderTest extends Assert {
     
+    @Test
     public void testConstructors() throws Exception {        
         QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
         try {
@@ -50,7 +51,7 @@
         assertNotNull(new JaxbAssertionBuilder<FooType>(FooType.class, qn));
     }
     
-    
+    @Test
     public void testGetKnownElements() throws Exception {
         QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
         JaxbAssertionBuilder<FooType> ab = new JaxbAssertionBuilder<FooType>(FooType.class,
qn);
@@ -58,8 +59,8 @@
         assertEquals(1, ab.getKnownElements().size());
         assertSame(qn, ab.getKnownElements().iterator().next());
     }
-
-    @SuppressWarnings(value = "unchecked")
+    
+    @Test
     public void testBuild() throws Exception {
         QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
         JaxbAssertionBuilder<FooType> ab = new JaxbAssertionBuilder<FooType>(FooType.class,
qn);

Modified: incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionTest.java
(original)
+++ incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionTest.java
Wed Mar 28 02:24:34 2007
@@ -24,8 +24,6 @@
 
 import javax.xml.namespace.QName;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.test.assertions.foo.FooType;
 import org.apache.cxf.ws.policy.builder.xml.XmlPrimitiveAssertion;
@@ -36,12 +34,15 @@
 import org.apache.neethi.PolicyComponent;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.Assert;
+import org.junit.Test;
 
 /**
  * 
  */
-public class JaxbAssertionTest extends TestCase {
+public class JaxbAssertionTest extends Assert {
 
+    @Test
     public void testBasic() {
         JaxbAssertion<FooType> assertion = new JaxbAssertion<FooType>();
         assertNull(assertion.getName());
@@ -61,6 +62,7 @@
         assertEquals(Constants.TYPE_ASSERTION, assertion.getType());
     }
     
+    @Test
     public void testEqual() {
         JaxbAssertion<FooType> assertion = new JaxbAssertion<FooType>();
         FooType data = new FooType();
@@ -101,6 +103,7 @@
         assertTrue(assertion.equal(assertion));          
     }
     
+    @Test
     public void testNormalise() {
         JaxbAssertion<FooType> assertion = new JaxbAssertion<FooType>();
         FooType data = new FooType();

Modified: incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionBuilderTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionBuilderTest.java
(original)
+++ incubator/cxf/trunk/api/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionBuilderTest.java
Wed Mar 28 02:24:34 2007
@@ -24,9 +24,9 @@
 import java.util.Collections;
 
 import javax.xml.namespace.QName;
+
 import org.w3c.dom.Element;
 
-import junit.framework.TestCase;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.ws.policy.AssertionBuilderRegistry;
 import org.apache.cxf.ws.policy.PolicyBuilder;
@@ -35,12 +35,15 @@
 import org.apache.neethi.Policy;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 
 /**
  * 
  */
-public class NestedPrimitiveAssertionBuilderTest extends TestCase {
+public class NestedPrimitiveAssertionBuilderTest extends Assert {
 
     private static final String TEST_NAMESPACE = "http://www.w3.org/2007/01/addressing/metadata";
     private static final QName TEST_NAME1 = new QName(TEST_NAMESPACE, "Addressing");
@@ -52,6 +55,7 @@
     private PolicyBuilder builder;
     private AssertionBuilderRegistry reg;
     
+    @Before
     public void setUp() {
         control = EasyMock.createNiceControl();
         npab = new NestedPrimitiveAssertionBuilder();
@@ -62,9 +66,7 @@
         npab.setAssertionBuilderRegistry(reg);
     }
     
-    public void tearDown() {        
-    }
-    
+    @Test
     public void testBuildFail() throws Exception {
         String data = 
             "<wsam:Addressing wsp:Optional=\"true\""
@@ -79,6 +81,7 @@
         }
     }
     
+    @Test
     public void testBuild() throws Exception {
         String data = 
             "<wsam:Addressing wsp:Optional=\"true\""
@@ -96,6 +99,7 @@
         control.verify();
     }
     
+    @Test
     public void testBuildCompatibleNoRegistry() {
         npab.setAssertionBuilderRegistry(null);
         Policy[] policies = NestedPrimitiveAssertionTest.buildTestPolicies(); 
@@ -103,6 +107,7 @@
         assertNull("Should not have been able to build compatible policy.", npab.buildCompatible(a,
a));
     }
     
+    @Test
     public void testCompatibleWithSelf() {
         Policy[] policies = NestedPrimitiveAssertionTest.buildTestPolicies();
         EasyMock.expect(reg.get(TEST_NAME1)).andReturn(npab).anyTimes();
@@ -120,7 +125,7 @@
         control.verify();
     }
         
-    
+    @Test
     public void testBuildCompatible() {
         Policy[] policies = NestedPrimitiveAssertionTest.buildTestPolicies();
         EasyMock.expect(reg.get(TEST_NAME1)).andReturn(npab).anyTimes();

Modified: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImplTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImplTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyInterceptorProviderRegistryImplTest.java
Wed Mar 28 02:24:34 2007
@@ -19,13 +19,13 @@
 
 package org.apache.cxf.ws.policy;
 
-import junit.framework.TestCase;
+import org.junit.Assert;
 import org.junit.Test;
 
 /**
  * 
  */
-public class PolicyInterceptorProviderRegistryImplTest extends TestCase {
+public class PolicyInterceptorProviderRegistryImplTest extends Assert {
 
     @Test
     public void testConstructors() {

Modified: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyRegistryImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyRegistryImplTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyRegistryImplTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyRegistryImplTest.java
Wed Mar 28 02:24:34 2007
@@ -19,16 +19,16 @@
 
 package org.apache.cxf.ws.policy;
 
-import junit.framework.TestCase;
 import org.apache.neethi.Policy;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.Assert;
 import org.junit.Test;
 
 /**
  * 
  */
-public class PolicyRegistryImplTest extends TestCase {
+public class PolicyRegistryImplTest extends Assert {
 
     @Test
     public void testAll() {

Modified: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builder/primitive/NestedPrimitiveAssertionTest.java
Wed Mar 28 02:24:34 2007
@@ -151,9 +151,4 @@
                        PolicyComparator.compare(expectedNormalisedPolicy, normalisedPolicy));
         }
     }
-    
-    @Test
-    public void testCompatible() {
-        
-    }
 }

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractEndpointTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractEndpointTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractEndpointTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractEndpointTest.java
Wed Mar 28 02:24:34 2007
@@ -21,18 +21,18 @@
 
 import javax.xml.namespace.QName;
 
-import junit.framework.TestCase;
 import org.apache.cxf.endpoint.Endpoint;
 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 AbstractEndpointTest extends TestCase {
+public class AbstractEndpointTest extends Assert {
 
     private IMocksControl control;    
     private RMEndpoint rme;

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractRMInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractRMInterceptorTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractRMInterceptorTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractRMInterceptorTest.java
Wed Mar 28 02:24:34 2007
@@ -22,7 +22,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
-import junit.framework.TestCase;
 import org.apache.cxf.Bus;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Message;
@@ -33,13 +32,14 @@
 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 AbstractRMInterceptorTest extends TestCase {
+public class AbstractRMInterceptorTest extends Assert {
 
     private IMocksControl control;
 

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractSequenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractSequenceTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractSequenceTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/AbstractSequenceTest.java
Wed Mar 28 02:24:34 2007
@@ -18,10 +18,10 @@
  */
 package org.apache.cxf.ws.rm;
 
-import junit.framework.TestCase;
+import org.junit.Assert;
 import org.junit.Test;
 
-public class AbstractSequenceTest extends TestCase {
+public class AbstractSequenceTest extends Assert {
 
     @Test
     public void testIdentifierEquals() {

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationSequenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationSequenceTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationSequenceTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationSequenceTest.java
Wed Mar 28 02:24:34 2007
@@ -26,7 +26,6 @@
 
 import javax.xml.namespace.QName;
 
-import junit.framework.TestCase;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.ws.addressing.v200408.EndpointReferenceType;
@@ -40,10 +39,11 @@
 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 DestinationSequenceTest extends TestCase {
+public class DestinationSequenceTest extends Assert {
 
     private IMocksControl control;
     private ObjectFactory factory;

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationTest.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationTest.java Wed
Mar 28 02:24:34 2007
@@ -23,7 +23,6 @@
 import java.lang.reflect.Method;
 import java.math.BigInteger;
 
-import junit.framework.TestCase;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.ws.addressing.AddressingPropertiesImpl;
@@ -35,13 +34,14 @@
 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 DestinationTest extends TestCase {
+public class DestinationTest extends Assert {
 
     private IMocksControl control;
     private RMEndpoint rme;

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/ProxyTest.java Wed Mar
28 02:24:34 2007
@@ -26,7 +26,6 @@
 
 import javax.xml.datatype.Duration;
 
-import junit.framework.TestCase;
 import org.apache.cxf.Bus;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.Endpoint;
@@ -48,13 +47,14 @@
 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 ProxyTest extends TestCase {
+public class ProxyTest extends Assert {
 
     private IMocksControl control;
     private RMEndpoint rme;

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMContextUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMContextUtilsTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMContextUtilsTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMContextUtilsTest.java
Wed Mar 28 02:24:34 2007
@@ -21,7 +21,6 @@
 
 import java.util.List;
 
-import junit.framework.TestCase;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.ws.addressing.AddressingProperties;
@@ -30,13 +29,14 @@
 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 RMContextUtilsTest extends TestCase {
+public class RMContextUtilsTest extends Assert {
     
     private IMocksControl control;
     

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMEndpointTest.java Wed
Mar 28 02:24:34 2007
@@ -25,7 +25,6 @@
 
 import javax.xml.namespace.QName;
 
-import junit.framework.TestCase;
 import org.apache.cxf.Bus;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.service.Service;
@@ -45,10 +44,11 @@
 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 RMEndpointTest extends TestCase {
+public class RMEndpointTest extends Assert {
     
     private IMocksControl control;
     private RMManager manager;

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMInInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMInInterceptorTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMInInterceptorTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMInInterceptorTest.java
Wed Mar 28 02:24:34 2007
@@ -25,7 +25,6 @@
 import java.util.Collections;
 import java.util.Iterator;
 
-import junit.framework.TestCase;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.Phase;
@@ -38,10 +37,11 @@
 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 RMInInterceptorTest extends TestCase {
+public class RMInInterceptorTest extends Assert {
     
     private IMocksControl control;
     private RMProperties rmps;

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java (original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMManagerTest.java Wed
Mar 28 02:24:34 2007
@@ -25,7 +25,6 @@
 import java.util.Date;
 import java.util.TimerTask;
 
-import junit.framework.TestCase;
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.endpoint.Endpoint;
@@ -42,11 +41,12 @@
 import org.apache.cxf.ws.rm.policy.RMAssertion;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 
-public class RMManagerTest extends TestCase {
+public class RMManagerTest extends Assert {
     
     private IMocksControl control;
     
@@ -96,8 +96,8 @@
         assertTrue(!rma.isSetInactivityTimeout());   
         
         SourcePolicyType sp = manager.getSourcePolicy();
-        assertEquals(0, sp.getSequenceExpiration().getTimeInMillis(new Date()));
-        assertEquals(0, sp.getOfferedSequenceExpiration().getTimeInMillis(new Date()));
+        assertEquals(0L, sp.getSequenceExpiration().getTimeInMillis(new Date()));
+        assertEquals(0L, sp.getOfferedSequenceExpiration().getTimeInMillis(new Date()));
         assertNull(sp.getAcksTo());
         assertTrue(sp.isIncludeOffer());
         SequenceTerminationPolicyType stp = sp.getSequenceTerminationPolicy();
@@ -110,8 +110,7 @@
     
     @Ignore
     @Test
-    public void xtestGetReliableEndpoint() {
-        
+    public void testGetReliableEndpoint() {    
         RMManager manager = new RMManager();
         Bus bus = control.createMock(Bus.class);
         manager.setBus(bus);

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMOutInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMOutInterceptorTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMOutInterceptorTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/RMOutInterceptorTest.java
Wed Mar 28 02:24:34 2007
@@ -25,7 +25,6 @@
 import java.util.Iterator;
 import java.util.List;
 
-import junit.framework.TestCase;
 import org.apache.cxf.interceptor.InterceptorChain;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
@@ -39,10 +38,11 @@
 import org.apache.cxf.ws.addressing.v200408.AttributedURI;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-public class RMOutInterceptorTest extends TestCase {
+public class RMOutInterceptorTest extends Assert {
     
     private IMocksControl control;
     

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/SourceSequenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/SourceSequenceTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/SourceSequenceTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/SourceSequenceTest.java
Wed Mar 28 02:24:34 2007
@@ -25,18 +25,17 @@
 import javax.xml.datatype.Duration;
 import javax.xml.namespace.QName;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.jaxb.DatatypeFactory;
 import org.apache.cxf.ws.rm.manager.SequenceTerminationPolicyType;
 import org.apache.cxf.ws.rm.manager.SourcePolicyType;
 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 SourceSequenceTest extends TestCase {
+public class SourceSequenceTest extends Assert {
 
     private IMocksControl control;
     private ObjectFactory factory;

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/policy/PolicyUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/policy/PolicyUtilsTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/policy/PolicyUtilsTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/policy/PolicyUtilsTest.java
Wed Mar 28 02:24:34 2007
@@ -23,8 +23,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.message.Message;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
@@ -32,22 +30,29 @@
 import org.apache.cxf.ws.rm.RMConstants;
 import org.easymock.IMocksControl;
 import org.easymock.classextension.EasyMock;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * 
  */
-public class PolicyUtilsTest extends TestCase {
+public class PolicyUtilsTest extends Assert {
 
     private IMocksControl control;
     
+    @Before
     public void setUp() {
         control = EasyMock.createNiceControl();
     }
     
+    @After
     public void tearDown() {
         control.verify();
     }
     
+    @Test
     public void testGetBaseRetranmissionInterval() {
         Message message = control.createMock(Message.class);
         AssertionInfoMap aim = control.createMock(AssertionInfoMap.class);
@@ -97,6 +102,7 @@
                      5000, PolicyUtils.getBaseRetransmissionInterval(message).intValue());
     }
     
+    @Test
     public void testUseExponentialBackoff() {
         Message message = control.createMock(Message.class);
         AssertionInfoMap aim = control.createMock(AssertionInfoMap.class);
@@ -118,7 +124,8 @@
         control.replay();
         assertTrue("Should use exponential backoff", PolicyUtils.useExponentialBackoff(message));
   
     }
-    
+   
+    @Test
     public void testGetAcknowledgmentInterval() {
         Message message = control.createMock(Message.class);
         AssertionInfoMap aim = control.createMock(AssertionInfoMap.class);

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptorTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptorTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptorTest.java
Wed Mar 28 02:24:34 2007
@@ -34,8 +34,6 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor;
 import org.apache.cxf.message.Exchange;
@@ -50,8 +48,12 @@
 import org.apache.cxf.ws.rm.SequenceType;
 import org.easymock.classextension.EasyMock;
 import org.easymock.classextension.IMocksControl;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
 
-public class RMSoapInterceptorTest extends TestCase {
+public class RMSoapInterceptorTest extends Assert {
 
     private static final String SEQ_IDENTIFIER = "http://Business456.com/RM/ABC";
     private static final BigInteger MSG1_MESSAGE_NUMBER = BigInteger.ONE;
@@ -66,10 +68,12 @@
     private AckRequestedType ar1;
     private AckRequestedType ar2;
     
+    @Before
     public void setUp() {
         control = EasyMock.createNiceControl(); 
     }
 
+    @Test
     public void testGetUnderstoodHeaders() throws Exception {
         RMSoapInterceptor codec = new RMSoapInterceptor();
         Set<QName> headers = codec.getUnderstoodHeaders();
@@ -81,6 +85,7 @@
                    headers.contains(RMConstants.getAckRequestedQName()));
     }
     
+    @Test
     public void testHandleMessage() throws NoSuchMethodException {
         Method m = RMSoapInterceptor.class.getDeclaredMethod("mediate", 
             new Class[] {SoapMessage.class});
@@ -94,6 +99,7 @@
         control.verify();
     }
     
+    @Test
     public void testHandleFault() throws NoSuchMethodException {
         Method m = RMSoapInterceptor.class.getDeclaredMethod("mediate", 
             new Class[] {SoapMessage.class});
@@ -107,6 +113,7 @@
         control.verify();
     }
     
+    @Test
     public void testMediate() throws NoSuchMethodException {
         Method m1 = RMSoapInterceptor.class.getDeclaredMethod("encode", 
                                                              new Class[] {SoapMessage.class});
@@ -136,6 +143,7 @@
         
     }
 
+    @Test
     public void testEncode() throws Exception {
         RMSoapInterceptor codec = new RMSoapInterceptor();
         setUpOutbound();
@@ -195,6 +203,7 @@
                                              RMConstants.getAckRequestedName()});
     }
 
+    @Test
     public void testDecodeSequence() throws XMLStreamException {
         SoapMessage message = setUpInboundMessage("resources/Message1.xml");
         RMSoapInterceptor codec = new RMSoapInterceptor();
@@ -210,6 +219,7 @@
 
     }
 
+    @Test
     public void testDecodeAcknowledgements() throws XMLStreamException {
         SoapMessage message = setUpInboundMessage("resources/Acknowledgment.xml");
         RMSoapInterceptor codec = new RMSoapInterceptor();
@@ -226,6 +236,7 @@
         assertNull(rmps.getAcksRequested());
     }
 
+    @Test
     public void testDecodeAcksRequested() throws XMLStreamException {
         SoapMessage message = setUpInboundMessage("resources/Retransmission.xml");
         RMSoapInterceptor codec = new RMSoapInterceptor();

Modified: incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImplTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImplTest.java?view=diff&rev=523244&r1=523243&r2=523244
==============================================================================
--- incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImplTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImplTest.java
Wed Mar 28 02:24:34 2007
@@ -27,8 +27,6 @@
 import java.util.List;
 import java.util.concurrent.Executor;
 
-import junit.framework.TestCase;
-
 import org.apache.cxf.message.Message;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
@@ -44,12 +42,16 @@
 import org.apache.cxf.ws.rm.policy.RMAssertion;
 import org.easymock.IMocksControl;
 import org.easymock.classextension.EasyMock;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
 
 
 /**
  * Test resend logic.
  */
-public class RetransmissionQueueImplTest extends TestCase {
+public class RetransmissionQueueImplTest extends Assert {
 
     private IMocksControl control;
     private RMManager manager;
@@ -68,6 +70,7 @@
         new ArrayList<Object>();
     private RMAssertion rma;
     
+    @Before
     public void setUp() {
         control = EasyMock.createNiceControl();
         manager = createMock(RMManager.class);
@@ -79,6 +82,7 @@
         assertNotNull(executor);
     }
     
+    @After
     public void tearDown() {
         control.verify();
         queue.stop();
@@ -89,7 +93,7 @@
         control.reset();
     }
     
-    
+    @Test
     public void testCtor() {
         ready(false);        
         assertNotNull("expected unacked map", queue.getUnacknowledged());
@@ -103,6 +107,7 @@
         assertSame("Unexpected RMManager", manager, queue.getManager());        
     }
     
+    @Test
     public void testGetBaseRetransmissionIntervalFromManager() {
         Message message = createMock(Message.class);
         EasyMock.expect(message.get(AssertionInfoMap.class)).andReturn(null);
@@ -110,7 +115,7 @@
         EasyMock.expect(rma.getBaseRetransmissionInterval()).andReturn(null);
         control.replay();
         assertEquals("Unexpected value for base retransmission interval", 
-                     0, queue.getBaseRetransmissionInterval(message));
+                     0L, queue.getBaseRetransmissionInterval(message));
         control.verify();
         control.reset();
         EasyMock.expect(message.get(AssertionInfoMap.class)).andReturn(null);
@@ -120,7 +125,7 @@
         EasyMock.expect(bri.getMilliseconds()).andReturn(null);
         control.replay();
         assertEquals("Unexpected value for base retransmission interval", 
-                     0, queue.getBaseRetransmissionInterval(message));
+                     0L, queue.getBaseRetransmissionInterval(message));
         control.verify();
         control.reset();
         EasyMock.expect(message.get(AssertionInfoMap.class)).andReturn(null);
@@ -129,9 +134,10 @@
         EasyMock.expect(bri.getMilliseconds()).andReturn(new BigInteger("7000"));
         control.replay();
         assertEquals("Unexpected value for base retransmission interval", 
-                     7000, queue.getBaseRetransmissionInterval(message));
+                     7000L, queue.getBaseRetransmissionInterval(message));
     }
     
+    @Test
     public void testUseExponentialBackoff() {
         Message message = createMock(Message.class);
         AssertionInfoMap aim = createMock(AssertionInfoMap.class);
@@ -163,6 +169,7 @@
         assertTrue("Should use exponential backoff", queue.useExponentialBackoff(message));
       
     }
     
+    @Test
     public void testResendCandidateCtor() {
         Message message = createMock(Message.class);
         setupMessagePolicies(message);
@@ -178,6 +185,7 @@
         assertTrue(!candidate.isPending());
     }
     
+    @Test
     public void testResendCandidateAttempted() {
         Message message = createMock(Message.class);
         setupMessagePolicies(message);
@@ -193,6 +201,7 @@
         assertTrue(!candidate.isPending());        
     }
     
+    @Test
     public void testCacheUnacknowledged() {
         Message message1 = setUpMessage("sequence1");
         Message message2 = setUpMessage("sequence2");
@@ -241,6 +250,7 @@
                    sequence1List.get(1).getMessage());
     }
     
+    @Test
     public void testPurgeAcknowledgedSome() {
         BigInteger[] messageNumbers = {BigInteger.TEN, BigInteger.ONE};
         SourceSequence sequence = setUpSequence("sequence1",
@@ -269,6 +279,7 @@
                      sequenceList.size());
     }
     
+    @Test
     public void testPurgeAcknowledgedNone() {
         BigInteger[] messageNumbers = {BigInteger.TEN, BigInteger.ONE};
         SourceSequence sequence = setUpSequence("sequence1",
@@ -297,11 +308,13 @@
                      sequenceList.size());
     }
     
+    @Test
     public void testIsEmpty() {
         ready(false);
         assertTrue("queue is not empty" , queue.isEmpty());
     }
 
+    @Test
     public void testCountUnacknowledged() {
         BigInteger[] messageNumbers = {BigInteger.TEN, BigInteger.ONE};
         SourceSequence sequence = setUpSequence("sequence1",
@@ -328,6 +341,7 @@
         assertTrue("queue is empty", !queue.isEmpty());
     }
     
+    @Test
     public void testCountUnacknowledgedUnknownSequence() {
         BigInteger[] messageNumbers = {BigInteger.TEN, BigInteger.ONE};
         SourceSequence sequence = setUpSequence("sequence1",
@@ -340,6 +354,7 @@
                      queue.countUnacknowledged(sequence));
     }
     
+    @Test
     public void testStartStop() {
         control.replay();
         queue.start();



Mime
View raw message