|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.commons.pool.TestKeyedObjectPool
org.apache.commons.pool.TestBaseKeyedObjectPool
org.apache.commons.pool.impl.TestStackKeyedObjectPool
public class TestStackKeyedObjectPool
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.commons.pool.TestKeyedObjectPool |
---|
TestKeyedObjectPool.FailingKeyedPoolableObjectFactory |
Field Summary |
---|
Fields inherited from class org.apache.commons.pool.TestKeyedObjectPool |
---|
KEY |
Constructor Summary | |
---|---|
TestStackKeyedObjectPool(String testName)
|
Method Summary | |
---|---|
protected Object |
getNthObject(Object key,
int n)
Return what we expect to be the nth object (zero indexed) created by the pool for the given key. |
protected boolean |
isFifo()
|
protected boolean |
isLifo()
|
protected org.apache.commons.pool.KeyedObjectPool |
makeEmptyPool(int mincapacity)
Create an KeyedObjectPool instance
that can contain at least mincapacity
idle and active objects, or
throw IllegalArgumentException
if such a pool cannot be created. |
protected org.apache.commons.pool.KeyedObjectPool |
makeEmptyPool(org.apache.commons.pool.KeyedPoolableObjectFactory factory)
Create an KeyedObjectPool with the specified factory. |
protected Object |
makeKey(int n)
|
void |
setUp()
|
static junit.framework.Test |
suite()
|
void |
tearDown()
|
void |
testBorrowFromEmptyPoolWithNullFactory()
|
void |
testBorrowReturnWithSometimesInvalidObjects()
|
void |
testCanResetFactoryWithoutActiveObjects()
|
void |
testCantResetFactoryWithActiveObjects()
|
void |
testCloseBug()
|
void |
testIdleCap()
|
void |
testPoolWithNullFactory()
|
void |
testSetFactory()
|
void |
testToString()
|
void |
testVariousConstructors()
|
Methods inherited from class org.apache.commons.pool.TestBaseKeyedObjectPool |
---|
testBaseAddObject, testBaseBorrow, testBaseBorrowReturn, testBaseClear, testBaseInvalidateObject, testBaseNumActiveNumIdle, testBaseNumActiveNumIdle2, testUnsupportedOperations |
Methods inherited from class org.apache.commons.pool.TestKeyedObjectPool |
---|
testClosedPoolBehavior, testKPOFAddObjectUsage, testKPOFBorrowObjectUsages, testKPOFClearUsages, testKPOFCloseUsages, testKPOFInvalidateObjectUsages, testKPOFReturnObjectUsages |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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 |
---|
public TestStackKeyedObjectPool(String testName)
Method Detail |
---|
public static junit.framework.Test suite()
protected org.apache.commons.pool.KeyedObjectPool makeEmptyPool(int mincapacity)
TestBaseKeyedObjectPool
KeyedObjectPool
instance
that can contain at least mincapacity
idle and active objects, or
throw IllegalArgumentException
if such a pool cannot be created.
makeEmptyPool
in class TestBaseKeyedObjectPool
protected org.apache.commons.pool.KeyedObjectPool makeEmptyPool(org.apache.commons.pool.KeyedPoolableObjectFactory factory)
TestKeyedObjectPool
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.
makeEmptyPool
in class TestBaseKeyedObjectPool
protected Object getNthObject(Object key, int n)
TestBaseKeyedObjectPool
getNthObject
in class TestBaseKeyedObjectPool
protected Object makeKey(int n)
makeKey
in class TestBaseKeyedObjectPool
public void setUp() throws Exception
setUp
in class TestBaseKeyedObjectPool
Exception
public void tearDown() throws Exception
tearDown
in class TestBaseKeyedObjectPool
Exception
public void testCloseBug() throws Exception
Exception
public void testIdleCap() throws Exception
Exception
public void testPoolWithNullFactory() throws Exception
Exception
public void testVariousConstructors() throws Exception
Exception
public void testToString() throws Exception
testToString
in class TestKeyedObjectPool
Exception
public void testBorrowFromEmptyPoolWithNullFactory() throws Exception
Exception
public void testSetFactory() throws Exception
Exception
public void testCantResetFactoryWithActiveObjects() throws Exception
Exception
public void testCanResetFactoryWithoutActiveObjects() throws Exception
Exception
public void testBorrowReturnWithSometimesInvalidObjects() throws Exception
Exception
protected boolean isLifo()
isLifo
in class TestBaseKeyedObjectPool
protected boolean isFifo()
isFifo
in class TestBaseKeyedObjectPool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |