Package org.magicbox.repository

Examples of org.magicbox.repository.Config


    public DbUnit() {
    }

    public static IDatabaseConnection setUpConnection() {
        Config config = new Config();
        System.out.println("DbUnit setUpConnection");
        if (dbConn == null) {
            Connection jdbcConnection = null;
            try {
                // Class.forName(config.getDbDriver());
                Class.forName(config.getDbDriverProduction());
                // Class.forName(config.getDbDriverDebug());
                jdbcConnection = DriverManager.getConnection(config.getDbUrl(), config.getDbUser(), config.getDbPass());

            } catch (ClassNotFoundException e) {
                e.printStackTrace();

            } catch (SQLException e) {
View Full Code Here


        }
        return dbConn;
    }

    public static void main(String[] args) throws Exception {
        Config config = new Config();
        Class.forName(config.getDbDriver());
        Connection jdbcConnection = DriverManager.getConnection(config.getDbUrl(), config.getDbUser(), config.getDbPass());
        IDatabaseConnection connection = new DatabaseConnection(jdbcConnection);

        // dtd
        FlatDtdDataSet.write(connection.createDataSet(), new FileOutputStream("src_test/it/freshfruits/conf/dbunit/database-schema.dtd"));
View Full Code Here

TOP

Related Classes of org.magicbox.repository.Config

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.