Search in sources :

Example 1 with MySqlConnection

use of org.dbunit.ext.mysql.MySqlConnection in project cloudstack by apache.

the class UsageSanityCheckerIT method setUp.

@Before
public void setUp() throws Exception {
    PropertiesUtil.loadFromFile(properties, PropertiesUtil.findConfigFile("db.properties"));
    Class.forName("com.mysql.jdbc.Driver");
    cloudConn = createConnection("cloud");
    usageConn = createConnection("usage");
    dbuCloudConn = new MySqlConnection(cloudConn, properties.getProperty("db.cloud.name"));
    dbuUsageConn = new MySqlConnection(usageConn, properties.getProperty("db.usage.name"));
    cloudDataSet = getCloudDataSet();
    usageDataSet = getUsageDataSet();
    DatabaseOperation.CLEAN_INSERT.execute(dbuCloudConn, cloudDataSet);
    DatabaseOperation.CLEAN_INSERT.execute(dbuUsageConn, usageDataSet);
}
Also used : MySqlConnection(org.dbunit.ext.mysql.MySqlConnection) Before(org.junit.Before)

Aggregations

MySqlConnection (org.dbunit.ext.mysql.MySqlConnection)1 Before (org.junit.Before)1