01: /*
02:
03: Derby - Class org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite
04:
05: Licensed to the Apache Software Foundation (ASF) under one
06: or more contributor license agreements. See the NOTICE file
07: distributed with this work for additional information
08: regarding copyright ownership. The ASF licenses this file
09: to you under the Apache License, Version 2.0 (the
10: "License"); you may not use this file except in compliance
11: with the License. You may obtain a copy of the License at
12:
13: http://www.apache.org/licenses/LICENSE-2.0
14:
15: Unless required by applicable law or agreed to in writing,
16: software distributed under the License is distributed on an
17: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18: KIND, either express or implied. See the License for the
19: specific language governing permissions and limitations
20: under the License
21: */
22: package org.apache.derbyTesting.functionTests.tests.jdbcapi;
23:
24: import org.apache.derbyTesting.junit.BaseTestCase;
25: import org.apache.derbyTesting.junit.JDBC;
26: import org.apache.derbyTesting.junit.NetworkServerTestSetup;
27: import org.apache.derbyTesting.junit.TestConfiguration;
28:
29: import junit.framework.Test;
30: import junit.framework.TestSuite;
31:
32: /**
33: * Suite to run all JUnit tests in this package:
34: * org.apache.derbyTesting.functionTests.tests.jdbcapi
35: *
36: */
37: public class _Suite extends BaseTestCase {
38:
39: /**
40: * Use suite method instead.
41: */
42: private _Suite(String name) {
43: super (name);
44: }
45:
46: public static Test suite() {
47:
48: TestSuite suite = new TestSuite("jdbcapi");
49:
50: suite.addTest(ConcurrencyTest.suite());
51: suite.addTest(HoldabilityTest.suite());
52: suite.addTest(ProcedureTest.suite());
53: suite.addTest(SURQueryMixTest.suite());
54: suite.addTest(SURTest.suite());
55: suite.addTest(UpdatableResultSetTest.suite());
56: suite.addTest(UpdateXXXTest.suite());
57: suite.addTestSuite(URCoveringIndexTest.class);
58: suite.addTest(ResultSetCloseTest.suite());
59:
60: if (JDBC.vmSupportsJDBC3()) {
61: // Class requires javax.sql.PooledConnection
62: // even to load, even though the suite method
63: // is correctly implemented.
64: suite.addTest(DataSourcePropertiesTest.suite());
65: }
66:
67: // Tests that are compiled using 1.4 target need to
68: // be added this way, otherwise creating the suite
69: // will throw an invalid class version error
70: if (JDBC.vmSupportsJDBC3() || JDBC.vmSupportsJSR169()) {
71: suite.addTest(ScrollResultSetTest.suite());
72: }
73:
74: if (TestConfiguration.runningInDerbyHarness())
75: return new NetworkServerTestSetup(suite);
76:
77: return suite;
78: }
79: }
|