Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DB5E72EDA for ; Mon, 25 Apr 2011 09:19:31 +0000 (UTC) Received: (qmail 278 invoked by uid 500); 25 Apr 2011 09:19:31 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 227 invoked by uid 500); 25 Apr 2011 09:19:31 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 220 invoked by uid 99); 25 Apr 2011 09:19:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Apr 2011 09:19:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Apr 2011 09:19:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0BBF123889EA; Mon, 25 Apr 2011 09:19:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110425091910.0BBF123889EA@eris.apache.org> 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 factory; try { @@ -62,6 +55,7 @@ public abstract class TestKeyedObjectPoo pool.close(); } + @Test public void testToString() { final KeyedObjectPoolFactory 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 makeFactory(final KeyedPoolableObjectFactory objectFactory) { return new GenericKeyedObjectPoolFactory(objectFactory); } + @Test public void testConstructors() throws Exception { GenericKeyedObjectPoolFactory factory = new GenericKeyedObjectPoolFactory(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 makeFactory(final KeyedPoolableObjectFactory objectFactory) throws UnsupportedOperationException { return new StackKeyedObjectPoolFactory(objectFactory); } + @Test public void testConstructors() throws Exception { StackKeyedObjectPoolFactory factory = new StackKeyedObjectPoolFactory(); factory.createPool().close();