use of gov.ca.cwds.cals.persistence.DBUnitAssertHelper in project cals-api by ca-cwds.
the class RFA1aCoreSubmitApplicationTest method testIfSubstituteCareProviderUCWasCreatedProperly.
private void testIfSubstituteCareProviderUCWasCreatedProperly(String substituteCareProviderId1, String substituteCareProviderId2) throws Exception {
DBUnitAssertHelper helper = DBUnitAssertHelper.builder(dbUnitSupport).setExpectedResultTemplatePath("/dbunit/SubstituteCareProviderUC.xml").setTestedTableName("SBPVD_UC").build();
ReplacementDataSet expectedDataSet = helper.getExpectedDataSet();
expectedDataSet.addReplacementObject("$substituteCareProviderId1", substituteCareProviderId1);
expectedDataSet.addReplacementObject("$substituteCareProviderId2", substituteCareProviderId2);
helper.assertEquals(new String[] { "PKSB_PVDRT", "LST_UPD_TS" }, new String[] { "FIRST_NM" });
}
use of gov.ca.cwds.cals.persistence.DBUnitAssertHelper in project cals-api by ca-cwds.
the class RFA1aCoreSubmitApplicationTest method testIfSubstituteCareProviderWasCreatedProperly.
private void testIfSubstituteCareProviderWasCreatedProperly(String substituteCareProviderId1, String substituteCareProviderId2) throws Exception {
DBUnitAssertHelper helper = DBUnitAssertHelper.builder(dbUnitSupport).setExpectedResultTemplatePath("/dbunit/SubstituteCareProvider.xml").setTestedTableName("SB_PVDRT").build();
ReplacementDataSet expectedDataSet = helper.getExpectedDataSet();
expectedDataSet.addReplacementObject("$substituteCareProviderId1", substituteCareProviderId1);
expectedDataSet.addReplacementObject("$substituteCareProviderId2", substituteCareProviderId2);
helper.assertEquals(new String[] { "IDENTIFIER", "LST_UPD_TS", "LIS_PER_ID", "ETH_UD_CD", "HISP_UD_CD", "PASSBC_CD" }, new String[] { "FIRST_NM" });
}
use of gov.ca.cwds.cals.persistence.DBUnitAssertHelper in project cals-api by ca-cwds.
the class RFA1aCoreSubmitApplicationTest method testIfOtherPeopleScpRelationshipWasCreatedProperly.
private void testIfOtherPeopleScpRelationshipWasCreatedProperly(String substituteCareProviderId) throws Exception {
DBUnitAssertHelper helper = DBUnitAssertHelper.builder(dbUnitSupport).setExpectedResultTemplatePath("/dbunit/OtherPeopleScpRelationship.xml").setTestedTableName("OPSCPRLT").appendTableFilter("FKSB_PVDRT", substituteCareProviderId).build();
ITable actualTable = helper.getActualTable();
assertEquals(2, actualTable.getRowCount());
}
use of gov.ca.cwds.cals.persistence.DBUnitAssertHelper in project cals-api by ca-cwds.
the class RFA1aCoreSubmitApplicationTest method testIfCountyOwnershipWasCreatedProperly.
private void testIfCountyOwnershipWasCreatedProperly(String placementHomeId, String[] substituteCareProviderIds) throws Exception {
DBUnitAssertHelper helper = DBUnitAssertHelper.builder(dbUnitSupport).setExpectedResultTemplatePath("/dbunit/CountyOwnership.xml").setTestedTableName("CNTYOWNT").build();
ReplacementDataSet expectedDataSet = helper.getExpectedDataSet();
expectedDataSet.addReplacementObject("$placementHomeId", placementHomeId);
expectedDataSet.addReplacementObject("$substituteCareProviderId1", substituteCareProviderIds[0]);
expectedDataSet.addReplacementObject("$substituteCareProviderId2", substituteCareProviderIds[1]);
helper.assertEquals(new String[] { "IDENTIFIER", "BKGRCHK_DT", "LST_UPD_TS" }, new String[] { "ENTITY_ID" });
}
use of gov.ca.cwds.cals.persistence.DBUnitAssertHelper in project cals-api by ca-cwds.
the class RFA1aCoreSubmitApplicationTest method testIfPlacementHomeInformationWasCreatedProperly.
private void testIfPlacementHomeInformationWasCreatedProperly(String placementHomeId, String substituteCareProviderId1, String substituteCareProviderId2) throws Exception {
DBUnitAssertHelper helper = DBUnitAssertHelper.builder(dbUnitSupport).setExpectedResultTemplatePath("/dbunit/PlacementHomeInformation.xml").setTestedTableName("HM_SCP_T").build();
ReplacementDataSet expectedDataSet = helper.getExpectedDataSet();
expectedDataSet.addReplacementObject("$placementHomeId", placementHomeId);
expectedDataSet.addReplacementObject("$substituteCareProviderId1", substituteCareProviderId1);
expectedDataSet.addReplacementObject("$substituteCareProviderId2", substituteCareProviderId2);
helper.assertEquals(new String[] { "THIRD_ID", "LST_UPD_TS" }, new String[] { "SCPRVD_IND" });
}
Aggregations