1 /*2 * Copyright (c) 2003 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.3 * 4 * Project: OpenSubsystems5 * 6 * $Id: CoreTests.java,v 1.19 2007/01/07 06:15:08 bastafidli Exp $7 * 8 * This program is free software; you can redistribute it and/or modify9 * it under the terms of the GNU General Public License as published by10 * the Free Software Foundation; version 2 of the License. 11 * 12 * This program is distributed in the hope that it will be useful,13 * but WITHOUT ANY WARRANTY; without even the implied warranty of14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15 * GNU General Public License for more details.16 * 17 * You should have received a copy of the GNU General Public License18 * along with this program; if not, write to the Free Software19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 */21 22 package org.opensubsystems.core;23 24 import junit.extensions.TestSetup;25 import junit.framework.Test;26 import junit.framework.TestSuite;27 28 import org.opensubsystems.core.persist.DataFactoryManagerTest;29 import org.opensubsystems.core.persist.db.DatabaseFactoryClassFactoryTest;30 import org.opensubsystems.core.persist.db.DatabaseSchemaClassFactoryTest;31 import org.opensubsystems.core.persist.db.DatabaseSchemaManagerTest;32 import org.opensubsystems.core.persist.db.DatabaseTestSetup;33 import org.opensubsystems.core.persist.db.DatabaseTestSuite;34 import org.opensubsystems.core.persist.db.connectionpool.ConnectionPoolTests;35 import org.opensubsystems.core.persist.db.driver.DriverTests;36 import org.opensubsystems.core.util.ClassFactoryTest;37 import org.opensubsystems.core.util.ClassUtilsTest;38 import org.opensubsystems.core.util.ConfigTest;39 import org.opensubsystems.core.util.DateUtilsTest;40 import org.opensubsystems.core.util.FileCommitUtilsTest;41 import org.opensubsystems.core.util.FileUtilsTest;42 import org.opensubsystems.core.util.PasswordUtilsTest;43 import org.opensubsystems.core.util.StringUtilsTest;44 45 /**46 * Test for classes included in Core package.47 *48 * @version $Id: CoreTests.java,v 1.19 2007/01/07 06:15:08 bastafidli Exp $49 * @author Miro Halas50 * @code.reviewer Miro Halas51 * @code.reviewed 1.14 2005/09/09 06:50:44 bastafidli52 */53 public final class CoreTests54 {55 // Constructors /////////////////////////////////////////////////////////////56 57 /** 58 * Private constructor since this class cannot be instantiated59 */60 private CoreTests(61 )62 {63 // Do nothing64 }65 66 // Public methods ///////////////////////////////////////////////////////////67 68 /**69 * Create suite of all core tests.70 * 71 * @return Test - suite of tests to run72 */73 public static Test suite(74 )75 {76 TestSuite suite = new DatabaseTestSuite("Test for core");77 addGenericTests(suite);78 TestSetup wrapper = new DatabaseTestSetup(suite);79 80 return wrapper;81 }82 83 /**84 * Add all generic database tests to given suite.85 * 86 * @param suite - suite of tests to run87 */88 public static void addGenericTests(89 TestSuite suite90 ) 91 {92 suite.addTestSuite(ClassFactoryTest.class);93 suite.addTestSuite(ClassUtilsTest.class);94 suite.addTestSuite(ConfigTest.class);95 suite.addTestSuite(DateUtilsTest.class);96 suite.addTestSuite(FileCommitUtilsTest.class);97 suite.addTestSuite(FileUtilsTest.class);98 suite.addTestSuite(PasswordUtilsTest.class);99 suite.addTestSuite(StringUtilsTest.class);100 suite.addTestSuite(DataFactoryManagerTest.class);101 suite.addTestSuite(DatabaseFactoryClassFactoryTest.class);102 suite.addTestSuite(DatabaseSchemaClassFactoryTest.class);103 suite.addTestSuite(DatabaseSchemaManagerTest.class);104 ConnectionPoolTests.addGenericTests(suite);105 DriverTests.addGenericTests(suite); 106 } 107 }108