Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.CleanDatabaseTestSetup


   
   
   
    private static Test basesuite() {
        Test basesuite = new TestSuite(ProcedureInTriggerTest.class);
        Test clean = new CleanDatabaseTestSetup(basesuite) {
        protected void decorateSQL(Statement s) throws SQLException {
            s.execute("create table t1 (i int primary key, b char(15))");
            s.execute("create table t2 (x integer, y integer)");
            s.execute("create procedure proc_no_sql() parameter style java language java NO SQL external name 'org.apache.derbyTesting.functionTests.tests.lang.ProcedureInTriggerTest.zeroArg'");
            s.execute("create procedure proc_contains_sql() parameter style java language java CONTAINS SQL external name 'org.apache.derbyTesting.functionTests.tests.lang.ProcedureInTriggerTest.getConnectionProc'");
View Full Code Here


      //a locale, we will get an exception during database create time.
      TestCase missingCollatorDbTest = new CollationTest(
          "testMissingCollatorSupport");
      suite.addTest(missingCollatorDbTest);

        suite.addTest(new CleanDatabaseTestSetup(
                new CollationTest("testDefaultCollation")));
        suite.addTest(collatedSuite("en", "testEnglishCollation"));
        
        // Only add tests for other locales if they are in fact supported
        // by the jvm.
View Full Code Here

    {
        TestSuite suite = new TestSuite
            ("Create ResultSets from PreparedStatements");
        suite.addTestSuite(ResultSetsFromPreparedStatementTest.class);

        TestSetup wrapper = new CleanDatabaseTestSetup(suite) {
                protected void decorateSQL(Statement s) throws SQLException
                {
                    Connection c = s.getConnection();
                    s.execute("create schema " +
                              ResultSetsFromPreparedStatementTest.SCHEMA);
View Full Code Here

        suite.addTestSuite(HoldCursorTest.class);
        if (!JDBC.vmSupportsJSR169()) {
             suite.addTest (new HoldCursorTest("StatementsInProcedureTest"));

           }
        return new CleanDatabaseTestSetup(suite);
    }
View Full Code Here

    Test s = new TestSuite(DistinctTest.class);
    Properties p = new Properties();
    p.put("derby.optimizer.noTimeout", "true");
    Test t = new SystemPropertyTestSetup(s, p);
   
    return new CleanDatabaseTestSetup(t) {
      protected void decorateSQL(Statement s) throws SQLException {
        s.execute("create table t (i int, s smallint, r real, f float, d date, t time, ts timestamp, c char(10), v varchar(20))");
        // for tests from distinctElimination
        s.execute("create table one(c1 int, c2 int, c3 int, c4 int, c5 int)");
View Full Code Here

    public static Test suite()
    {
        TestSuite suite = new TestSuite("GROUP BY expression tests");
        suite.addTestSuite(GroupByExpressionTest.class);
       
        TestSetup wrapper = new CleanDatabaseTestSetup(suite) {
          protected void decorateSQL(Statement s) throws SQLException
            {
                for (int i = 0; i < TABLES.length; i++) {
                    s.execute(TABLES[i]);
                }
View Full Code Here

    }
   
    protected static Test baseSuite(String name) {
        TestSuite suite = new TestSuite(name);
        suite.addTestSuite(DeadlockModeTest.class);
        return new CleanDatabaseTestSetup(
                DatabasePropertyTestSetup.setLockTimeouts(suite, 2, 4))
        {
            /**
             * Creates the tables used in the test cases.
             * @exception SQLException if a database error occurs
View Full Code Here

   
    protected static Test encryptedBaseSuite(String name) {
        TestSuite suite = new TestSuite(name);
        suite.addTestSuite(DeadlockModeTest.class);
       
        return new CleanDatabaseTestSetup(
                DatabasePropertyTestSetup.setLockTimeouts(Decorator.encryptedDatabase(suite), 2, 4))
        {
            /**
             * Creates the tables used in the test cases.
             * @exception SQLException if a database error occurs
View Full Code Here

            TestConfiguration.embeddedSuite(InListMultiProbeTest.class));

        /* Wrap the suite in a CleanDatabaseTestSetup that will create
         * and populate the test table.
         */
        return new CleanDatabaseTestSetup(suite)
        {
            /**
            * Create and populate the test table.
            */
            protected void decorateSQL(Statement s) throws SQLException
View Full Code Here

     * Construct top level suite in this JUnit test
     */
    public static Test suite()
    {
        TestSuite suite = (TestSuite) TestConfiguration.embeddedSuite(GeneratedColumnsTest.class);
        Test        cleanDatabaseSuite = new CleanDatabaseTestSetup( suite );

        //
        // Copies the data file to a location which can be read.
        //
        Test        result = new SupportFilesSetup
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.