01: /*-------------------------------------------------------------------------
02: *
03: * Copyright (c) 2004-2005, PostgreSQL Global Development Group
04: *
05: * IDENTIFICATION
06: * $PostgreSQL: pgjdbc/org/postgresql/test/jdbc3/Jdbc3TestSuite.java,v 1.16 2006/05/15 09:35:57 jurka Exp $
07: *
08: *-------------------------------------------------------------------------
09: */
10: package org.postgresql.test.jdbc3;
11:
12: import org.postgresql.test.TestUtil;
13:
14: import junit.framework.TestSuite;
15:
16: /*
17: * Executes all known tests for JDBC3
18: */
19: public class Jdbc3TestSuite extends TestSuite {
20:
21: /*
22: * The main entry point for JUnit
23: */
24: public static TestSuite suite() throws Exception {
25: Class.forName("org.postgresql.Driver");
26: TestSuite suite = new TestSuite();
27: try {
28: java.sql.Connection con = TestUtil.openDB();
29:
30: if (TestUtil.haveMinimumServerVersion(con, "8.1")
31: && TestUtil.isProtocolVersion(con, 3)) {
32: suite.addTestSuite(Jdbc3CallableStatementTest.class);
33: }
34: con.close();
35: } catch (Exception ex) {
36: ex.printStackTrace();
37: }
38:
39: suite.addTestSuite(Jdbc3SavepointTest.class);
40: suite.addTestSuite(TypesTest.class);
41: suite.addTestSuite(ResultSetTest.class);
42: suite.addTestSuite(ParameterMetaDataTest.class);
43: suite.addTestSuite(Jdbc3BlobTest.class);
44: return suite;
45: }
46: }
|