File: Jdbc2TestSuite.java

package info (click to toggle)
libpgjava 8.4-701-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,532 kB
  • ctags: 4,162
  • sloc: java: 33,948; xml: 3,158; makefile: 14; sh: 10
file content (103 lines) | stat: -rw-r--r-- 3,193 bytes parent folder | download
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*-------------------------------------------------------------------------
*
* Copyright (c) 2004-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
*   $PostgreSQL: pgjdbc/org/postgresql/test/jdbc2/Jdbc2TestSuite.java,v 1.26 2009/07/01 05:00:40 jurka Exp $
*
*-------------------------------------------------------------------------
*/
package org.postgresql.test.jdbc2;

import java.sql.Connection;

import junit.framework.TestSuite;

import org.postgresql.test.TestUtil;

/*
 * 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() throws Exception
    {
        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.
        //
        suite.addTestSuite(ANTTest.class);

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

        // Connectivity/Protocols

        // ResultSet
        suite.addTestSuite(ResultSetTest.class);
        suite.addTestSuite(ResultSetMetaDataTest.class);
        suite.addTestSuite(ArrayTest.class);
        suite.addTestSuite(RefCursorTest.class);

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

        // PreparedStatement
        suite.addTestSuite(PreparedStatementTest.class);
        suite.addTestSuite(StatementTest.class);

        // ServerSide Prepared Statements
        suite.addTestSuite(ServerPreparedStmtTest.class);

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


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

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

        suite.addTestSuite(UpdateableResultTest.class );

        suite.addTestSuite(CallableStmtTest.class );
        suite.addTestSuite(CursorFetchTest.class);
        suite.addTestSuite(ServerCursorTest.class);

        suite.addTestSuite(IntervalTest.class);
        suite.addTestSuite(GeometricTest.class);

        suite.addTestSuite(LoginTimeoutTest.class);

        Connection conn = TestUtil.openDB();
        if (TestUtil.isProtocolVersion(conn, 3)) {
            suite.addTestSuite(CopyTest.class);
        }
        conn.close();

        // That's all folks
        return suite;
    }
}