Jdbc2TestSuite.java 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
package org.postgresql.test.jdbc2;

import junit.framework.TestSuite;
import junit.framework.TestCase;
import junit.framework.Test;

import java.sql.*;
import java.lang.reflect.Method;

/*
 * Executes all known tests for JDBC2 and includes some utility methods.
 */
public class Jdbc2TestSuite extends TestSuite
{

	/*
	 * The main entry point for JUnit
	 */
	public static TestSuite suite()
	{
		TestSuite suite = new TestSuite();

		//
		// Add one line per class in our test cases. These should be in order of
		// complexity.

		// ANTTest should be first as it ensures that test parameters are
		// being sent to the suite. It also initialises the database (if required)
		// with some simple global tables (will make each testcase use its own later).
		//
		suite.addTestSuite(ANTTest.class);

		// Basic Driver internals
		suite.addTestSuite(DriverTest.class);
		suite.addTestSuite(ConnectionTest.class);
		suite.addTestSuite(DatabaseMetaDataTest.class);
		suite.addTestSuite(EncodingTest.class);

		// Connectivity/Protocols

		// ResultSet
		suite.addTestSuite(ResultSetTest.class);

		// Time, Date, Timestamp
		suite.addTestSuite(DateTest.class);
		suite.addTestSuite(TimeTest.class);
		suite.addTestSuite(TimestampTest.class);

		// PreparedStatement

		// BatchExecute
		suite.addTestSuite(BatchExecuteTest.class);

		// MetaData

		// Other misc tests, based on previous problems users have had or specific
		// features some applications require.
		suite.addTestSuite(JBuilderTest.class);
		suite.addTestSuite(MiscTest.class);

		// Fastpath/LargeObject
		suite.addTestSuite(BlobTest.class);
		suite.addTestSuite( UpdateableResultTest.class );

		suite.addTestSuite( CallableStmtTest.class );
B
Bruce Momjian 已提交
66

67 68 69 70
		// That's all folks
		return suite;
	}
}