Search in sources :

Example 26 with BaseTestSuite

use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.

the class DataSourceTest method baseSuite.

/**
 * Return a suite of tests that are run with both client and embedded
 *
 * @param postfix suite name postfix
 * @return A suite of tests to be run with client and/or embedded
 */
private static Test baseSuite(String postfix) {
    BaseTestSuite suite = new BaseTestSuite("ClientAndEmbedded" + postfix);
    suite.addTest(new DataSourceTest("testBadConnectionAttributeSyntax"));
    suite.addTest(new DataSourceTest("testDescriptionProperty"));
    suite.addTest(new DataSourceTest("testAllDataSources"));
    suite.addTest(new DataSourceTest("testJira95ds"));
    return suite;
}
Also used : BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 27 with BaseTestSuite

use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.

the class DataSourceTest method getEmbeddedSuite.

/**
 * Return a suite of tests that are run with embedded only
 *
 * @param postfix suite name postfix
 * @return A suite of tests being run with embedded only
 */
private static Test getEmbeddedSuite(String postfix) {
    BaseTestSuite suite = new BaseTestSuite("Embedded" + postfix);
    suite.addTest(new DataSourceTest("testDSRequestAuthentication"));
    return suite;
}
Also used : BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 28 with BaseTestSuite

use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.

the class PoolXADSCreateShutdownDBTest method suite.

public static Test suite() {
    BaseTestSuite suite = new BaseTestSuite("PoolXADSCreateShutdownTest");
    Test test = TestConfiguration.defaultSuite(PoolXADSCreateShutdownDBTest.class);
    // Test test = TestConfiguration.clientServerSuite(DSCreateShutdownDBTest.class);
    suite.addTest(test);
    TestSetup setup = TestConfiguration.singleUseDatabaseDecorator(suite);
    // we need a couple extra databases to test they get created
    for (int i = 0; i < ADDITIONAL_DBS.length; i++) {
        setup = TestConfiguration.additionalDatabaseDecorator(setup, "emb" + ADDITIONAL_DBS[i]);
        setup = TestConfiguration.additionalDatabaseDecorator(setup, "srv" + ADDITIONAL_DBS[i]);
    }
    return suite;
}
Also used : TestSetup(junit.extensions.TestSetup) Test(junit.framework.Test) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 29 with BaseTestSuite

use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.

the class ProcedureTest method suite.

// SETUP
/**
 * Runs the test fixtures in embedded and client.
 * @return test suite
 */
public static Test suite() {
    BaseTestSuite suite = new BaseTestSuite("ProcedureTest");
    suite.addTest(baseSuite("ProcedureTest:embedded"));
    suite.addTest(TestConfiguration.clientServerDecorator(baseSuite("ProcedureTest:client")));
    return suite;
}
Also used : BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Example 30 with BaseTestSuite

use of org.apache.derbyTesting.junit.BaseTestSuite in project derby by apache.

the class RelativeTest method suite.

/**
 * Runs the test fixtures in embedded and client.
 *
 * @return test suite
 */
public static Test suite() {
    BaseTestSuite suite = new BaseTestSuite("RelativeTest");
    suite.addTest(baseSuite("RelativeTest:embedded"));
    suite.addTest(TestConfiguration.clientServerDecorator(baseSuite("RelativeTest:client")));
    return suite;
}
Also used : BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite)

Aggregations

BaseTestSuite (org.apache.derbyTesting.junit.BaseTestSuite)476 Test (junit.framework.Test)136 CleanDatabaseTestSetup (org.apache.derbyTesting.junit.CleanDatabaseTestSetup)118 Statement (java.sql.Statement)81 PreparedStatement (java.sql.PreparedStatement)68 SupportFilesSetup (org.apache.derbyTesting.junit.SupportFilesSetup)49 Properties (java.util.Properties)43 SystemPropertyTestSetup (org.apache.derbyTesting.junit.SystemPropertyTestSetup)34 CallableStatement (java.sql.CallableStatement)19 Connection (java.sql.Connection)14 SecurityManagerSetup (org.apache.derbyTesting.junit.SecurityManagerSetup)13 DatabasePropertyTestSetup (org.apache.derbyTesting.junit.DatabasePropertyTestSetup)11 TestSetup (junit.extensions.TestSetup)10 SQLException (java.sql.SQLException)7 LocaleTestSetup (org.apache.derbyTesting.junit.LocaleTestSetup)7 Method (java.lang.reflect.Method)5 Locale (java.util.Locale)5 BaseJDBCTestSetup (org.apache.derbyTesting.junit.BaseJDBCTestSetup)4 NetworkServerTestSetup (org.apache.derbyTesting.junit.NetworkServerTestSetup)4 ResultSet (java.sql.ResultSet)3