1 16 package org.apache.commons.pool; 17 18 import junit.framework.Test; 19 import junit.framework.TestCase; 20 import junit.framework.TestSuite; 21 22 26 public class TestBaseKeyedPoolableObjectFactory extends TestCase { 27 public TestBaseKeyedPoolableObjectFactory(String testName) { 28 super(testName); 29 } 30 31 public static Test suite() { 32 return new TestSuite(TestBaseKeyedPoolableObjectFactory.class); 33 } 34 35 public void testDefaultMethods() throws Exception { 37 KeyedPoolableObjectFactory factory = new BaseKeyedPoolableObjectFactory() { 38 public Object makeObject(Object key) throws Exception { 39 return null; 40 } 41 }; 42 43 factory.activateObject("key",null); factory.passivateObject("key",null); factory.destroyObject("key",null); assertTrue(factory.validateObject("key",null)); } 48 } 49 | Popular Tags |