org.apache.commons.pool
Class TestKeyedObjectPool

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

public abstract class TestKeyedObjectPool
extends junit.framework.TestCase

Abstract TestCase for ObjectPool implementations.

Version:
$Revision: 774099 $ $Date: 2009-05-12 14:29:02 -0700 (Tue, 12 May 2009) $
Author:
Rodney Waldhoff, Sandy McArthur

Nested Class Summary
protected static class TestKeyedObjectPool.FailingKeyedPoolableObjectFactory
           
 
Field Summary
protected  String KEY
           
 
Constructor Summary
TestKeyedObjectPool(String testName)
           
 
Method Summary
protected abstract  KeyedObjectPool makeEmptyPool(KeyedPoolableObjectFactory factory)
          Create an KeyedObjectPool with the specified factory.
 void testClosedPoolBehavior()
           
 void testKPOFAddObjectUsage()
           
 void testKPOFBorrowObjectUsages()
           
 void testKPOFClearUsages()
           
 void testKPOFCloseUsages()
           
 void testKPOFInvalidateObjectUsages()
           
 void testKPOFReturnObjectUsages()
           
 void testToString()
           
 
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY

protected final String KEY
See Also:
Constant Field Values
Constructor Detail

TestKeyedObjectPool

public TestKeyedObjectPool(String testName)
Method Detail

makeEmptyPool

protected abstract KeyedObjectPool makeEmptyPool(KeyedPoolableObjectFactory factory)
Create an KeyedObjectPool with the specified factory. The pool should be in a default configuration and conform to the expected behaviors described in KeyedObjectPool. Generally speaking there should be no limits on the various object counts.


testClosedPoolBehavior

public void testClosedPoolBehavior()
                            throws Exception
Throws:
Exception

testKPOFAddObjectUsage

public void testKPOFAddObjectUsage()
                            throws Exception
Throws:
Exception

testKPOFBorrowObjectUsages

public void testKPOFBorrowObjectUsages()
                                throws Exception
Throws:
Exception

testKPOFReturnObjectUsages

public void testKPOFReturnObjectUsages()
                                throws Exception
Throws:
Exception

testKPOFInvalidateObjectUsages

public void testKPOFInvalidateObjectUsages()
                                    throws Exception
Throws:
Exception

testKPOFClearUsages

public void testKPOFClearUsages()
                         throws Exception
Throws:
Exception

testKPOFCloseUsages

public void testKPOFCloseUsages()
                         throws Exception
Throws:
Exception

testToString

public void testToString()
                  throws Exception
Throws:
Exception


Copyright © 2001-2014 The Apache Software Foundation. All Rights Reserved.