Package org.apache.roller.weblogger.business.startup

Examples of org.apache.roller.weblogger.business.startup.SQLScriptRunner


            // but some folks test against MySQL
            dbname = "mysql";
        }
       
        String scriptPath = "WEB-INF/dbscripts/dummydb/createdb-"+dbname+".sql";
        SQLScriptRunner runner = new SQLScriptRunner(scriptPath);
        assertTrue(runner != null);
        assertTrue(runner.getCommandCount() == 5);       
    }   
View Full Code Here


            // but some folks test against MySQL
            dbname = "mysql";
        }
       
        // run script to create tables
        SQLScriptRunner create =
            new SQLScriptRunner("WEB-INF/dbscripts/dummydb/createdb-"+dbname+".sql");
        create.runScript(con, true);
       
        // check to ensure tables were created
        assertTrue(tableExists(con, "testrolleruser"));
        assertTrue(tableExists(con, "testuserrole"));
       
        // drop tables
        SQLScriptRunner drop =
            new SQLScriptRunner("WEB-INF/dbscripts/dummydb/droptables.sql");
        drop.runScript(con, false);

        // check to ensure tables were dropped
        assertFalse(tableExists(con, "testrolleruser"));
        assertFalse(tableExists(con, "testuserrole"));
    }
View Full Code Here

TOP

Related Classes of org.apache.roller.weblogger.business.startup.SQLScriptRunner

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.