001: /*
002: * Copyright 2006 Le Duc Bao, Ralf Joachim
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
005: * use this file except in compliance with the License. You may obtain a copy of
006: * the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
012: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
013: * License for the specific language governing permissions and limitations under
014: * the License.
015: */
016: package org.castor.ddlgen;
017:
018: import junit.framework.Test;
019: import junit.framework.TestCase;
020: import junit.framework.TestSuite;
021:
022: import org.apache.log4j.xml.DOMConfigurator;
023: import org.castor.ddlgen.engine.db2.Db2GeneratorTest;
024: import org.castor.ddlgen.engine.derby.DerbyGeneratorTest;
025: import org.castor.ddlgen.engine.hsql.HsqlGeneratorTest;
026: import org.castor.ddlgen.engine.mssql.MssqlGeneratorTest;
027: import org.castor.ddlgen.engine.mysql.MysqlGeneratorTest;
028: import org.castor.ddlgen.engine.oracle.OracleGeneratorTest;
029: import org.castor.ddlgen.engine.pointbase.PointBaseGeneratorTest;
030: import org.castor.ddlgen.engine.postgresql.PostgresqlGeneratorTest;
031: import org.castor.ddlgen.engine.sapdb.SapdbGeneratorTest;
032: import org.castor.ddlgen.engine.sybase.SybaseGeneratorTest;
033:
034: /**
035: * Test all DDL generator
036: *
037: * @author <a href="mailto:leducbao AT gmail DOT com">Le Duc Bao</a>
038: * @author <a href="mailto:ralf DOT joachim AT syscon DOT eu">Ralf Joachim</a>
039: * @version $Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
040: * @since 1.1
041: */
042: public class TestAll extends TestCase {
043:
044: /**log file*/
045: private static final String LOG_FILE = "log4j-test.xml";
046:
047: /**
048: * Constructor for TestAll
049: * @param name name
050: */
051: public TestAll(final String name) {
052: super (name);
053: }
054:
055: /**
056: *
057: * @param args params
058: */
059: public static void main(final String[] args) {
060: try {
061: DOMConfigurator.configure(LOG_FILE);
062:
063: // TestResult result =
064: junit.textui.TestRunner.run(TestAll.suite());
065: // junit.swingui.TestRunner.run(TestAll.class);
066: } catch (Exception e) {
067: e.printStackTrace();
068: }
069: }
070:
071: /**
072: *
073: * @return Test
074: * @throws Exception exception
075: */
076: public static Test suite() throws Exception {
077: TestSuite suite = new TestSuite("All org.castor.ddl tests");
078:
079: //GeneratorFactory test
080: suite.addTest(GeneratorFactoryTest.suite());
081:
082: //MySQL generator test
083: suite.addTest(MysqlGeneratorTest.suite());
084:
085: //Oracle generator test
086: suite.addTest(OracleGeneratorTest.suite());
087:
088: //PostgreSQL generator test
089: suite.addTest(PostgresqlGeneratorTest.suite());
090:
091: //Derby generator test
092: suite.addTest(DerbyGeneratorTest.suite());
093:
094: //Mssql generator test
095: suite.addTest(MssqlGeneratorTest.suite());
096:
097: //Sapdb generator test
098: suite.addTest(SapdbGeneratorTest.suite());
099:
100: //db2 generator test
101: suite.addTest(Db2GeneratorTest.suite());
102:
103: //db2 generator test
104: suite.addTest(SybaseGeneratorTest.suite());
105:
106: //hsql generator test
107: suite.addTest(HsqlGeneratorTest.suite());
108:
109: //pointbase generator test
110: suite.addTest(PointBaseGeneratorTest.suite());
111:
112: return suite;
113: }
114:
115: }
|