use of org.dbunit.dataset.LowerCaseDataSet in project activityinfo by bedatadriven.
the class DbUnit method loadDatset.
public void loadDatset(URL resource) throws Throwable {
InputStream in = Resources.asByteSource(resource).openStream();
Preconditions.checkNotNull("Cannot find xml file " + resource);
LowerCaseDataSet dataSet = new LowerCaseDataSet(new FlatXmlDataSetBuilder().setDtdMetadata(true).setColumnSensing(true).build(new InputStreamReader(in)));
IDatabaseConnection dbUnitConnection = new MySqlConnection(connection, null);
InsertIdentityOperation.INSERT.execute(dbUnitConnection, dataSet);
}
Aggregations