Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.CleanDatabaseTestSetup


  private static Test getSuite(String[] list)
  {
        TestSuite suite = new TestSuite("SQL scripts");
        for (int i = 0; i < list.length; i++)
            suite.addTest(
                new CleanDatabaseTestSetup(
                new LangScripts(list[i])));

        return getIJConfig(suite);
    }
View Full Code Here


     */
    public static Test suite()
    {
        TestSuite suite = (TestSuite) TestConfiguration.embeddedSuite(GeneratedColumnsPermsTest.class);

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

        return authorizedTest;
View Full Code Here

  /**
   * One set of grant/revoke tests for either client/server or embedded.
   */
  public static Test basesuite() {
    Test basesuite = new TestSuite(GrantRevokeTest.class);
    Test clean = new CleanDatabaseTestSetup(basesuite) {
        protected void decorateSQL(Statement s) throws SQLException {
          s.execute("create schema s1");
          s.execute("create schema s2");
          s.execute("create table s1.t1(c1 int, c2 int, c3 int)");
          s.execute("create table s2.t1(c1 int, c2 int, c3 int)");
View Full Code Here

    {
        /* Tests running with sql authorization set.  First decorate
         * with clean database, then with authentication +
         * sqlAuthorization.
         */
        Test clean = new CleanDatabaseTestSetup(
            new TestSuite(RolesConferredPrivilegesTest.class)) {
                protected void decorateSQL(Statement s)
                        throws SQLException {
                    /*
                     *          a1            a2         a3
View Full Code Here

  public GroupByTest(String name) {
    super(name);
  }
 
  public static Test suite() {
    return new CleanDatabaseTestSetup(
        new TestSuite(GroupByTest.class, "GroupByTest")) {
      protected void decorateSQL(Statement s)
        throws SQLException
      {
        createSchemaObjects(s);
View Full Code Here

    }
   
    protected static Test baseSuite(String name) {
        TestSuite suite = new TestSuite(name);
        suite.addTestSuite(BatchUpdateTest.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

            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

            suite.addTest
                (new CallableTest("xtestNumericBoundariesProc"));
        }


        return new CleanDatabaseTestSetup(suite)
        {
            /**
            * Creates the tables and the stored procedures used in the test
            * cases.
            * @throws SQLException
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", false, ENGLISH_CASE_SENSITIVE));
        suite.addTest(collatedSuite("en", true, ENGLISH_CASE_INSENSITIVE));
        
        // Only add tests for other locales if they are in fact supported
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

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.