org.apache.commons.pool
Class TestObjectPool

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.pool.TestObjectPool
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
TestBaseObjectPool

public abstract class TestObjectPool
extends junit.framework.TestCase

Abstract TestCase for ObjectPool implementations.

Version:
$Revision: 775703 $ $Date: 2009-05-17 12:39:51 -0400 (Sun, 17 May 2009) $
Author:
Rodney Waldhoff, Sandy McArthur

Constructor Summary
TestObjectPool(String testName)
           
 
Method Summary
protected abstract  org.apache.commons.pool.ObjectPool makeEmptyPool(org.apache.commons.pool.PoolableObjectFactory factory)
          Create an ObjectPool with the specified factory.
 void testClosedPoolBehavior()
           
 void testPOFAddObjectUsage()
           
 void testPOFBorrowObjectUsages()
           
 void testPOFClearUsages()
           
 void testPOFCloseUsages()
           
 void testPOFInvalidateObjectUsages()
           
 void testPOFReturnObjectUsages()
           
 void testSetFactory()
           
 void testToString()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestObjectPool

public TestObjectPool(String testName)
Method Detail

makeEmptyPool

protected abstract org.apache.commons.pool.ObjectPool makeEmptyPool(org.apache.commons.pool.PoolableObjectFactory factory)
                                                             throws UnsupportedOperationException
Create an ObjectPool with the specified factory. The pool should be in a default configuration and conform to the expected behaviors described in ObjectPool. Generally speaking there should be no limits on the various object counts.

Throws:
UnsupportedOperationException - if the pool being tested does not follow pool contracts.

testClosedPoolBehavior

public void testClosedPoolBehavior()
                            throws Exception
Throws:
Exception

testPOFAddObjectUsage

public void testPOFAddObjectUsage()
                           throws Exception
Throws:
Exception

testPOFBorrowObjectUsages

public void testPOFBorrowObjectUsages()
                               throws Exception
Throws:
Exception

testPOFReturnObjectUsages

public void testPOFReturnObjectUsages()
                               throws Exception
Throws:
Exception

testPOFInvalidateObjectUsages

public void testPOFInvalidateObjectUsages()
                                   throws Exception
Throws:
Exception

testPOFClearUsages

public void testPOFClearUsages()
                        throws Exception
Throws:
Exception

testPOFCloseUsages

public void testPOFCloseUsages()
                        throws Exception
Throws:
Exception

testSetFactory

public void testSetFactory()
                    throws Exception
Throws:
Exception

testToString

public void testToString()


Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.