001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018 package org.apache.commons.pool.impl; 019 020 import junit.framework.Test; 021 import junit.framework.TestCase; 022 import junit.framework.TestSuite; 023 024 /** 025 * JUnit test suite for the {@link org.apache.commons.pool.impl} 026 * package. 027 * 028 * @author Rodney Waldhoff 029 * @version $Revision: 606062 $ $Date: 2007-12-20 19:09:27 -0500 (Thu, 20 Dec 2007) $ 030 */ 031 public class TestAll extends TestCase { 032 public TestAll(String testName) { 033 super(testName); 034 } 035 036 public static Test suite() { 037 TestSuite suite = new TestSuite(); 038 suite.addTest(TestStackObjectPool.suite()); 039 suite.addTest(TestStackKeyedObjectPool.suite()); 040 suite.addTest(TestGenericObjectPool.suite()); 041 suite.addTest(TestGenericKeyedObjectPool.suite()); 042 suite.addTest(TestSoftReferenceObjectPool.suite()); 043 //suite.addTest(TestSoftRefOutOfMemory.suite()); // isn't reliable? 044 045 // Pool Factory tests 046 suite.addTest(TestGenericObjectPoolFactory.suite()); 047 suite.addTest(TestStackObjectPoolFactory.suite()); 048 suite.addTest(TestGenericKeyedObjectPoolFactory.suite()); 049 suite.addTest(TestStackKeyedObjectPoolFactory.suite()); 050 return suite; 051 } 052 053 public static void main(String args[]) { 054 String[] testCaseName = { TestAll.class.getName() }; 055 junit.textui.TestRunner.main(testCaseName); 056 } 057 }