use of org.dbunit.dataset.xml.FlatXmlDataSet in project sonarqube by SonarSource.
the class AbstractDbTester method dbUnitDataSet.
private IDataSet dbUnitDataSet(InputStream stream) {
try {
ReplacementDataSet dataSet = new ReplacementDataSet(new FlatXmlDataSet(stream));
dataSet.addReplacementObject("[null]", null);
dataSet.addReplacementObject("[false]", Boolean.FALSE);
dataSet.addReplacementObject("[true]", Boolean.TRUE);
return dataSet;
} catch (Exception e) {
throw translateException("Could not read the dataset stream", e);
}
}
use of org.dbunit.dataset.xml.FlatXmlDataSet in project Asqatasun by Asqatasun.
the class AbstractDaoTestCase method getDataSet.
/**
* Charge le jeu de données à partir d'un fichier XML d'import
*/
@Override
protected IDataSet getDataSet() throws Exception {
FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder();
FlatXmlDataSet loadedDataSet = flatXmlDataSetBuilder.build(new FileInputStream(getInputDataFileName()));
return loadedDataSet;
}
Aggregations