commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1096438 - in /commons/proper/pool/trunk/src/test/org/apache/commons/pool2: TestKeyedObjectPoolFactory.java impl/TestGenericKeyedObjectPoolFactory.java impl/TestStackKeyedObjectPoolFactory.java
Date Mon, 25 Apr 2011 09:19:09 GMT
Author: simonetripodi
Date: Mon Apr 25 09:19:09 2011
New Revision: 1096438

URL: http://svn.apache.org/viewvc?rev=1096438&view=rev
Log:
TestKeyedObjectPoolFactory (and related subclasses) tests moved to JUnit4 annotations

Modified:
    commons/proper/pool/trunk/src/test/org/apache/commons/pool2/TestKeyedObjectPoolFactory.java
    commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestGenericKeyedObjectPoolFactory.java
    commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackKeyedObjectPoolFactory.java

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool2/TestKeyedObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool2/TestKeyedObjectPoolFactory.java?rev=1096438&r1=1096437&r2=1096438&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool2/TestKeyedObjectPoolFactory.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool2/TestKeyedObjectPoolFactory.java
Mon Apr 25 09:19:09 2011
@@ -17,12 +17,7 @@
 
 package org.apache.commons.pool2;
 
-import org.apache.commons.pool2.KeyedObjectPool;
-import org.apache.commons.pool2.KeyedObjectPoolFactory;
-import org.apache.commons.pool2.KeyedPoolableObjectFactory;
-import org.apache.commons.pool2.PoolUtils;
-
-import junit.framework.TestCase;
+import org.junit.Test;
 
 /**
  * Tests for all {@link KeyedObjectPoolFactory}s.
@@ -30,10 +25,7 @@ import junit.framework.TestCase;
  * @author Sandy McArthur
  * @version $Revision$ $Date$
  */
-public abstract class TestKeyedObjectPoolFactory extends TestCase {
-    protected TestKeyedObjectPoolFactory(final String name) {
-        super(name);
-    }
+public abstract class TestKeyedObjectPoolFactory {
 
     /**
      * @throws UnsupportedOperationException when this is unsupported by this KeyedPoolableObjectFactory
type.
@@ -51,6 +43,7 @@ public abstract class TestKeyedObjectPoo
         return PoolUtils.adapt(new MethodCallPoolableObjectFactory());
     }
 
+    @Test
     public void testCreatePool() throws Exception {
         final KeyedObjectPoolFactory<Object,Object> factory;
         try {
@@ -62,6 +55,7 @@ public abstract class TestKeyedObjectPoo
         pool.close();
     }
 
+    @Test
     public void testToString() {
         final KeyedObjectPoolFactory<Object,Object> factory;
         try {

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestGenericKeyedObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestGenericKeyedObjectPoolFactory.java?rev=1096438&r1=1096437&r2=1096438&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestGenericKeyedObjectPoolFactory.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestGenericKeyedObjectPoolFactory.java
Mon Apr 25 09:19:09 2011
@@ -17,12 +17,12 @@
 
 package org.apache.commons.pool2.impl;
 
+import static junit.framework.Assert.assertEquals;
+
 import org.apache.commons.pool2.KeyedObjectPoolFactory;
 import org.apache.commons.pool2.KeyedPoolableObjectFactory;
 import org.apache.commons.pool2.TestKeyedObjectPoolFactory;
-import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
-import org.apache.commons.pool2.impl.GenericKeyedObjectPoolFactory;
-import org.apache.commons.pool2.impl.GenericObjectPool;
+import org.junit.Test;
 
 /**
  * Tests for {@link GenericKeyedObjectPoolFactory}.
@@ -31,15 +31,13 @@ import org.apache.commons.pool2.impl.Gen
  * @version $Revision$ $Date$
  */
 public class TestGenericKeyedObjectPoolFactory extends TestKeyedObjectPoolFactory {
-    public TestGenericKeyedObjectPoolFactory(final String name) {
-        super(name);
-    }
 
     @Override
     protected KeyedObjectPoolFactory<Object,Object> makeFactory(final KeyedPoolableObjectFactory<Object,Object>
objectFactory) {
         return new GenericKeyedObjectPoolFactory<Object,Object>(objectFactory);
     }
 
+    @Test
     public void testConstructors() throws Exception {
         GenericKeyedObjectPoolFactory<Object,Object> factory = new GenericKeyedObjectPoolFactory<Object,Object>(createObjectFactory());
         factory.createPool().close();

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackKeyedObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackKeyedObjectPoolFactory.java?rev=1096438&r1=1096437&r2=1096438&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackKeyedObjectPoolFactory.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackKeyedObjectPoolFactory.java
Mon Apr 25 09:19:09 2011
@@ -17,11 +17,12 @@
 
 package org.apache.commons.pool2.impl;
 
+import static junit.framework.Assert.assertEquals;
+
 import org.apache.commons.pool2.KeyedObjectPoolFactory;
 import org.apache.commons.pool2.KeyedPoolableObjectFactory;
 import org.apache.commons.pool2.TestKeyedObjectPoolFactory;
-import org.apache.commons.pool2.impl.StackKeyedObjectPool;
-import org.apache.commons.pool2.impl.StackKeyedObjectPoolFactory;
+import org.junit.Test;
 
 /**
  * Tests for {@link StackKeyedObjectPoolFactory}.
@@ -30,15 +31,13 @@ import org.apache.commons.pool2.impl.Sta
  * @version $Revision$ $Date$
  */
 public class TestStackKeyedObjectPoolFactory extends TestKeyedObjectPoolFactory {
-    public TestStackKeyedObjectPoolFactory(final String name) {
-        super(name);
-    }
 
     @Override
     protected KeyedObjectPoolFactory<Object,Object> makeFactory(final KeyedPoolableObjectFactory<Object,Object>
objectFactory) throws UnsupportedOperationException {
         return new StackKeyedObjectPoolFactory<Object,Object>(objectFactory);
     }
 
+    @Test
     public void testConstructors() throws Exception {
         StackKeyedObjectPoolFactory<Object,Object> factory = new StackKeyedObjectPoolFactory<Object,Object>();
         factory.createPool().close();



Mime
View raw message