KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derbyTesting > functionTests > tests > jdbcapi > _Suite


1 /*
2
3    Derby - Class org.apache.derbyTesting.functionTests.tests.jdbcapi._Suite
4
5        Licensed to the Apache Software Foundation (ASF) under one
6        or more contributor license agreements. See the NOTICE file
7        distributed with this work for additional information
8        regarding copyright ownership. The ASF licenses this file
9        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 JavaDoc 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         {
62             // Class requires javax.sql.PooledConnection
63
// even to load, even though the suite method
64
// is correctly implemented.
65
suite.addTest(DataSourcePropertiesTest.suite());
66         }
67         
68         // Tests that are compiled using 1.4 target need to
69
// be added this way, otherwise creating the suite
70
// will throw an invalid class version error
71
if (JDBC.vmSupportsJDBC3() || JDBC.vmSupportsJSR169())
72         {
73             suite.addTest(ScrollResultSetTest.suite());
74         }
75         
76         if (TestConfiguration.runningInDerbyHarness())
77             return new NetworkServerTestSetup(suite);
78         
79         return suite;
80     }
81 }
82
Popular Tags