commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1096418 - in /commons/proper/pool/trunk/src/test/org/apache/commons/pool2: TestObjectPoolFactory.java impl/TestGenericObjectPoolFactory.java impl/TestStackObjectPoolFactory.java
Date Mon, 25 Apr 2011 06:35:07 GMT
Author: simonetripodi
Date: Mon Apr 25 06:35:07 2011
New Revision: 1096418

URL: http://svn.apache.org/viewvc?rev=1096418&view=rev
Log:
tests moved to JUnit4 annotations

Modified:
    commons/proper/pool/trunk/src/test/org/apache/commons/pool2/TestObjectPoolFactory.java
    commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestGenericObjectPoolFactory.java
    commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPoolFactory.java

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool2/TestObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool2/TestObjectPoolFactory.java?rev=1096418&r1=1096417&r2=1096418&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool2/TestObjectPoolFactory.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool2/TestObjectPoolFactory.java
Mon Apr 25 06:35:07 2011
@@ -17,11 +17,8 @@
 
 package org.apache.commons.pool2;
 
-import org.apache.commons.pool2.ObjectPool;
-import org.apache.commons.pool2.ObjectPoolFactory;
-import org.apache.commons.pool2.PoolableObjectFactory;
+import org.junit.Test;
 
-import junit.framework.TestCase;
 
 /**
  * Unit tests for all {@link ObjectPoolFactory}.
@@ -29,10 +26,7 @@ import junit.framework.TestCase;
  * @author Sandy McArthur
  * @version $Revision$ $Date$
  */
-public abstract class TestObjectPoolFactory extends TestCase {
-    protected TestObjectPoolFactory(final String name) {
-        super(name);
-    }
+public abstract class TestObjectPoolFactory {
 
     /**
      * @throws UnsupportedOperationException when this is unsupported by this PoolableObjectFactory
type.
@@ -46,6 +40,7 @@ public abstract class TestObjectPoolFact
      */
     protected abstract ObjectPoolFactory<Object> makeFactory(PoolableObjectFactory<Object>
objectFactory) throws UnsupportedOperationException;
 
+    @Test
     public void testCreatePool() throws Exception {
         final ObjectPoolFactory<Object> factory;
         try {

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestGenericObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestGenericObjectPoolFactory.java?rev=1096418&r1=1096417&r2=1096418&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestGenericObjectPoolFactory.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestGenericObjectPoolFactory.java
Mon Apr 25 06:35:07 2011
@@ -17,6 +17,8 @@
 
 package org.apache.commons.pool2.impl;
 
+import static junit.framework.Assert.*;
+
 import java.util.NoSuchElementException;
 
 import org.apache.commons.pool2.MethodCallPoolableObjectFactory;
@@ -25,6 +27,7 @@ import org.apache.commons.pool2.Poolable
 import org.apache.commons.pool2.TestObjectPoolFactory;
 import org.apache.commons.pool2.impl.GenericObjectPool;
 import org.apache.commons.pool2.impl.GenericObjectPoolFactory;
+import org.junit.Test;
 
 /**
  * Tests for {@link GenericObjectPoolFactory}.
@@ -33,14 +36,13 @@ import org.apache.commons.pool2.impl.Gen
  * @version $Revision$ $Date$
  */
 public class TestGenericObjectPoolFactory extends TestObjectPoolFactory {
-    public TestGenericObjectPoolFactory(final String name) {
-        super(name);
-    }
 
+    @Override
     protected ObjectPoolFactory<Object> makeFactory(final PoolableObjectFactory<Object>
objectFactory) throws UnsupportedOperationException {
         return new GenericObjectPoolFactory<Object>(objectFactory);
     }
 
+    @Test
     public void testConstructors() throws Exception {
         GenericObjectPoolFactory<Object> factory = new GenericObjectPoolFactory<Object>(new
MethodCallPoolableObjectFactory());
         GenericObjectPool<Object> pool;

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPoolFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPoolFactory.java?rev=1096418&r1=1096417&r2=1096418&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPoolFactory.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool2/impl/TestStackObjectPoolFactory.java
Mon Apr 25 06:35:07 2011
@@ -17,12 +17,13 @@
 
 package org.apache.commons.pool2.impl;
 
+import static junit.framework.Assert.assertEquals;
+
 import org.apache.commons.pool2.MethodCallPoolableObjectFactory;
 import org.apache.commons.pool2.ObjectPoolFactory;
 import org.apache.commons.pool2.PoolableObjectFactory;
 import org.apache.commons.pool2.TestObjectPoolFactory;
-import org.apache.commons.pool2.impl.StackObjectPool;
-import org.apache.commons.pool2.impl.StackObjectPoolFactory;
+import org.junit.Test;
 
 /**
  * Tests for {@link StackObjectPoolFactory}.
@@ -31,15 +32,13 @@ import org.apache.commons.pool2.impl.Sta
  * @version $Revision$ $Date$
  */
 public class TestStackObjectPoolFactory extends TestObjectPoolFactory {
-    public TestStackObjectPoolFactory(final String name) {
-        super(name);
-    }
 
     @Override
     protected ObjectPoolFactory<Object> makeFactory(final PoolableObjectFactory<Object>
objectFactory) throws UnsupportedOperationException {
         return new StackObjectPoolFactory<Object>(objectFactory);
     }
 
+    @Test
     public void testConstructors() throws Exception {
         StackObjectPoolFactory<Object> factory = new StackObjectPoolFactory<Object>();
         factory.createPool().close();



Mime
View raw message