Search in sources :

Example 1 with TimeZoneTestSetup

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

the class NativeAuthenticationServiceTest method suite.

// /////////////////////////////////////////////////////////////////////////////////
// 
// JUnit BEHAVIOR
// 
// /////////////////////////////////////////////////////////////////////////////////
/**
 * Construct top level suite in this JUnit test
 */
public static Test suite() throws Exception {
    BaseTestSuite suite = new BaseTestSuite();
    // 
    if (enableSubprotocolTests()) {
        suite.addTest((new NativeAuthenticationServiceTest(JAR_ENCRYPTED, NATIVE, LOCAL, DONT_DISABLE_AUTH)).decorate(false));
    }
    suite.addTest(allConfigurations(false));
    if (!JDBC.vmSupportsJSR169()) {
        suite.addTest(allConfigurations(true));
    }
    // should be OK to run in the local time zone.
    return new TimeZoneTestSetup(suite, "GMT");
}
Also used : BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite) TimeZoneTestSetup(org.apache.derbyTesting.junit.TimeZoneTestSetup)

Example 2 with TimeZoneTestSetup

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

the class AutomaticIndexStatisticsTest method suite.

public static Test suite() {
    Test test = new BaseTestSuite(AutomaticIndexStatisticsTest.class);
    test = new CleanDatabaseTestSetup(test);
    test = TestConfiguration.additionalDatabaseDecorator(test, MASTERDB);
    // TimeZoneTestSetup can probably be removed once DERBY-5974 is fixed.
    return new TimeZoneTestSetup(test, "GMT");
}
Also used : Test(junit.framework.Test) CleanDatabaseTestSetup(org.apache.derbyTesting.junit.CleanDatabaseTestSetup) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite) TimeZoneTestSetup(org.apache.derbyTesting.junit.TimeZoneTestSetup)

Example 3 with TimeZoneTestSetup

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

the class LocalizedDisplayScriptTest method getSuite.

/**
 * Return a localized test based on the script name.
 * The test is surrounded in a decorator that sets up the
 * desired properties which is wrapped in a decorator
 * which sets up the timezone wrapped in a decorator
 * that cleans the database.
 */
private static Test getSuite() {
    BaseTestSuite suite = new BaseTestSuite("localized Display");
    Properties uiProps = new Properties();
    uiProps.put("derby.ui.locale", "es_AR");
    uiProps.put("derby.ui.codeset", ENCODING);
    suite.addTest(new TimeZoneTestSetup(new SystemPropertyTestSetup(new LocalizedDisplayScriptTest("LocalizedDisplay"), uiProps), "America/Los_Angeles"));
    return getIJConfig(suite);
}
Also used : SystemPropertyTestSetup(org.apache.derbyTesting.junit.SystemPropertyTestSetup) BaseTestSuite(org.apache.derbyTesting.junit.BaseTestSuite) Properties(java.util.Properties) TimeZoneTestSetup(org.apache.derbyTesting.junit.TimeZoneTestSetup)

Aggregations

BaseTestSuite (org.apache.derbyTesting.junit.BaseTestSuite)3 TimeZoneTestSetup (org.apache.derbyTesting.junit.TimeZoneTestSetup)3 Properties (java.util.Properties)1 Test (junit.framework.Test)1 CleanDatabaseTestSetup (org.apache.derbyTesting.junit.CleanDatabaseTestSetup)1 SystemPropertyTestSetup (org.apache.derbyTesting.junit.SystemPropertyTestSetup)1