import org.dbunit.dataset.ReplacementDataSet;
import org.dbunit.dataset.filter.DefaultColumnFilter;
import org.dbunit.dataset.xml.FlatXmlDataSet;
-import org.dbunit.ext.mssql.InsertIdentityOperation;
import org.dbunit.ext.mysql.MySqlMetadataHandler;
import org.dbunit.operation.DatabaseOperation;
import org.junit.Assert;
import org.sonar.core.persistence.dialect.MySql;
import javax.sql.DataSource;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
} else {
databaseTester = new MyDBTester(database.getDataSource());
}
-
myBatis = new MyBatis(database, new Logback(), queue);
myBatis.start();
}
dataSets[i] = getData(dataSetStream[i]);
}
databaseTester.setDataSet(new CompositeDataSet(dataSets));
-
- new InsertIdentityOperation(DatabaseOperation.INSERT).execute(connection, databaseTester.getDataSet());
+ databaseTester.setSetUpOperation(DatabaseOperation.INSERT);
+ databaseTester.onSetup();
} catch (Exception e) {
throw translateException("Could not setup DBUnit data", e);
}