use of gov.ca.cwds.cals.persistence.DBUnitAssertHelper 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" });
}
use of gov.ca.cwds.cals.persistence.DBUnitAssertHelper in project cals-api by ca-cwds.
the class RFA1aCoreSubmitApplicationTest method testIfOtherAdultsWasCreatedProperly.
private void testIfOtherAdultsWasCreatedProperly(String placementHomeId) throws Exception {
DBUnitAssertHelper helper = DBUnitAssertHelper.builder(dbUnitSupport).setExpectedResultTemplatePath("/dbunit/OtherAdultsInPlacementHome.xml").setTestedTableName("OTH_ADLT").appendTableFilter("FKPLC_HM_T", placementHomeId).build();
helper.assertEquals(new String[] { "IDENTIFIER", "FKPLC_HM_T", "LST_UPD_TS" }, new String[] { "OTH_ADLTNM" });
}
use of gov.ca.cwds.cals.persistence.DBUnitAssertHelper in project cals-api by ca-cwds.
the class RFA1aCoreSubmitApplicationTest method testIfPhoneContactDetailsWasCreatedProperly.
private void testIfPhoneContactDetailsWasCreatedProperly(String substituteCareProviderId) throws Exception {
DBUnitAssertHelper helper = DBUnitAssertHelper.builder(dbUnitSupport).setExpectedResultTemplatePath("/dbunit/PhoneContactDetail.xml").setTestedTableName("PH_CNT_T").appendTableFilter("ESTBLSH_ID", substituteCareProviderId).build();
String[] ignoreCols = { "THIRD_ID", "ESTBLSH_ID", "LST_UPD_TS" };
String[] sortedCols = { "PHONE_NO" };
helper.assertEquals(ignoreCols, sortedCols);
}
use of gov.ca.cwds.cals.persistence.DBUnitAssertHelper in project cals-api by ca-cwds.
the class RFA1aCoreSubmitApplicationTest method testIfPlacementFacilityTypeHistoryWasCreatedProperly.
private void testIfPlacementFacilityTypeHistoryWasCreatedProperly(String placementHomeId) throws Exception {
DBUnitAssertHelper helper = DBUnitAssertHelper.builder(dbUnitSupport).setExpectedResultTemplatePath("/dbunit/PlacementFacilityTypeHistory.xml").setTestedTableName("PFACHIST").appendTableFilter("FKPLC_HM_T", placementHomeId).appendTemplateParameter("faciltiyType", getFacilityType(placementHomeId)).appendTemplateParameter("placementHomeId", placementHomeId).build();
ITable actualTable = helper.getActualTable();
assertEquals(1, actualTable.getRowCount());
helper.assertEquals(new String[] { "THIRD_ID", "CREATN_TS", "LST_UPD_ID", "LST_UPD_TS", "START_TS" });
}
Aggregations