Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.CleanDatabaseTestSetup


     *
     * @return A suite containing the test cases.
     */
    private static Test makeSuite()
    {
        return new CleanDatabaseTestSetup(
            new TestSuite(OrderByAndSortAvoidance.class)) {
                protected void decorateSQL(Statement st)
                        throws SQLException {
                    getConnection().setAutoCommit(false);
                    st.executeUpdate("create table a(col1 int, col2 int)");
View Full Code Here


    }
   
    public static Test suite() {
        TestSuite suite = new TestSuite(RoutineTest.class, "RoutineTest");
       
        return new CleanDatabaseTestSetup(suite);
    }
View Full Code Here

     * Run only in embedded as TRIGGERs are server side logic.
     * Also the use of a ThreadLocal to check state requires
     * embedded.
     */
    public static Test suite() {
        return new CleanDatabaseTestSetup(
                TestConfiguration.embeddedSuite(TriggerTest.class));
       
    }
View Full Code Here

            client = new TestSuite("SavepointJdbc30_JSR169Test:client XADatasource");
            client.addTestSuite(SavepointJdbc30Test.class);
            suite.addTest(TestConfiguration.clientServerDecorator(TestConfiguration.connectionXADecorator(client)));         
       
        // return suite;
        return new CleanDatabaseTestSetup(suite) {
            /**
             * Creates the database objects used in the test cases.
             *
             * @throws SQLException
             */
 
View Full Code Here

        if (JDBC.vmSupportsJSR169())
            return new TestSuite("GrantRevokeDDLTest"); // return empty suite;
                //test uses triggers and procedures that use DriverManager.
        TestSuite suite = new TestSuite(GrantRevokeDDLTest.class, "GrantRevokeDDL Test");
      Test test = new SupportFilesSetup(suite);
      test = new CleanDatabaseTestSetup(test);
      test = DatabasePropertyTestSetup.builtinAuthentication(
        test, users, "grantrevokeddl");
        test = TestConfiguration.sqlAuthorizationDecorator(test);
       
        return test;
View Full Code Here

            suite.addTest(TestConfiguration.clientServerDecorator(
                    getTimeoutSuite(":client")));
            // wrap all in CleanDatabaseTestSetup that creates all database
            // objects any fixture might need.
            // Note that not all fixtures need (all of) these.
            return new CleanDatabaseTestSetup(suite) {
                /**
                 * Create and populate database objects
                 *
                 * @see org.apache.derbyTesting.junit.CleanDatabaseTestSetup#decorateSQL(java.sql.Statement)
                 */
 
View Full Code Here

        // Need atleast JSR169 to run these tests
        if (!JDBC.vmSupportsJSR169() && !JDBC.vmSupportsJDBC3()) {
            return suite;
        }

        Test cleanTest = new CleanDatabaseTestSetup(suite);
        Test authenticatedTest = DatabasePropertyTestSetup.builtinAuthentication
                (cleanTest, LEGAL_USERS, "sequence");
        Test authorizedTest = TestConfiguration.sqlAuthorizationDecorator(authenticatedTest);

        return authorizedTest;
View Full Code Here

    }

    protected static Test baseSuite(String name) {
        TestSuite suite = new TestSuite(name);
        suite.addTestSuite(DateTimeTest.class);
        return new CleanDatabaseTestSetup(suite) {
            /**
             * Creates the tables used in the test cases.
             * @exception SQLException if a database error occurs
             */
            protected void decorateSQL(Statement stmt) throws SQLException {
View Full Code Here

  }
 
  public static Test baseSuite(String name) {
    TestSuite suite = new TestSuite(ImportExportTest.class, name);
    Test test = new SupportFilesSetup(suite, new String[] {"functionTests/testData/ImportExport/TwoLineBadEOF.dat"} );
    return new CleanDatabaseTestSetup(test) {
            protected void decorateSQL(Statement s) throws SQLException {

                s.execute( "create type Price external name 'org.apache.derbyTesting.functionTests.tests.lang.Price' language java" );
                s.execute( "create type hashmap external name 'java.util.HashMap' language java" );
View Full Code Here

    public TriggerTests(String name) {
        super(name);
    }
 
    public static Test suite() {
        Test suite = new CleanDatabaseTestSetup(TestConfiguration
                .embeddedSuite(TriggerTests.class));
        Properties p = new Properties();
        // use small pageCacheSize so we don't run out of memory on the insert.
        p.setProperty("derby.storage.pageCacheSize", "100");
        return new SystemPropertyTestSetup(suite,p);
View Full Code Here

TOP

Related Classes of org.apache.derbyTesting.junit.CleanDatabaseTestSetup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.