use of org.dbunit.dataset.ReplacementDataSet in project Asqatasun by Asqatasun.
the class AbstractDaoTestCase method getDataSet.
/**
* Charge le jeu de données à partir d'un fichier XML d'import
* @return
* @throws java.lang.Exception
*/
@Override
protected IDataSet getDataSet() throws Exception {
FlatXmlDataSetBuilder builder = new FlatXmlDataSetBuilder();
builder.setColumnSensing(true);
ReplacementDataSet dataSet = new ReplacementDataSet(builder.build(new FileInputStream(getDataSetFilename())));
dataSet.addReplacementObject("[NULL]", null);
return dataSet;
}
use of org.dbunit.dataset.ReplacementDataSet in project cals-api by ca-cwds.
the class RFA1aCoreSubmitApplicationTest method testIfEmergencyContactDetailWasCreatedProperly.
private void testIfEmergencyContactDetailWasCreatedProperly(String placementHomeId) throws Exception {
DBUnitAssertHelper helper = DBUnitAssertHelper.builder(dbUnitSupport).setExpectedResultTemplatePath("/dbunit/EmergencyContactDetail.xml").setTestedTableName("EM_CNT_T").appendTableFilter("ESTBLSH_ID", placementHomeId).build();
ReplacementDataSet expectedDataSet = helper.getExpectedDataSet();
expectedDataSet.addReplacementObject("$placementHomeId", placementHomeId);
helper.assertEquals(new String[] { "IDENTIFIER", "LST_UPD_TS" });
}
Aggregations