use of gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome in project api-core by ca-cwds.
the class R00180Test method checkValidDates.
@Test
public void checkValidDates() throws Exception {
OtherAdultsInPlacementHome otherAdultsInPlacementHome = new OtherAdultsInPlacementHome();
otherAdultsInPlacementHome.setStartDt(LocalDate.now().minus(20, ChronoUnit.YEARS));
otherAdultsInPlacementHome.setEndDt(LocalDate.now().minus(10, ChronoUnit.YEARS));
OtherAdultInHomeEntityAwareDTO otherAdultInHomeEntityAwareDTO = new OtherAdultInHomeEntityAwareDTO();
otherAdultInHomeEntityAwareDTO.setEntity(otherAdultsInPlacementHome);
placementHomeEntityAwareDTO.getOtherAdultInHomeParameterObjects().add(otherAdultInHomeEntityAwareDTO);
checkRuleValid(placementHomeEntityAwareDTO, RULE_NAME);
}
use of gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome in project api-core by ca-cwds.
the class R00180Test method checkStartDateNullValid.
@Test
public void checkStartDateNullValid() throws Exception {
OtherAdultsInPlacementHome otherAdultsInPlacementHome = new OtherAdultsInPlacementHome();
otherAdultsInPlacementHome.setStartDt(null);
otherAdultsInPlacementHome.setEndDt(LocalDate.now().minus(10, ChronoUnit.YEARS));
OtherAdultInHomeEntityAwareDTO otherAdultInHomeEntityAwareDTO = new OtherAdultInHomeEntityAwareDTO();
otherAdultInHomeEntityAwareDTO.setEntity(otherAdultsInPlacementHome);
placementHomeEntityAwareDTO.getOtherAdultInHomeParameterObjects().add(otherAdultInHomeEntityAwareDTO);
checkRuleValid(placementHomeEntityAwareDTO, RULE_NAME);
}
use of gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome in project api-core by ca-cwds.
the class R10227Test method testIdentifiedDateInvalid.
@Test
public void testIdentifiedDateInvalid() {
OtherAdultsInPlacementHome otherAdultsInPlacementHome = new OtherAdultsInPlacementHome();
otherAdultsInPlacementHome.setBirthDt(LocalDate.now().minus(20, ChronoUnit.YEARS));
otherAdultsInPlacementHome.setIdentfdDt(LocalDate.now().minus(30, ChronoUnit.YEARS));
OtherAdultInHomeEntityAwareDTO otherAdultInHomeEntityAwareDTO = new OtherAdultInHomeEntityAwareDTO();
otherAdultInHomeEntityAwareDTO.setEntity(otherAdultsInPlacementHome);
placementHomeEntityAwareDTO.setOtherAdultInHomeParameterObjects(Collections.singletonList(otherAdultInHomeEntityAwareDTO));
check("R-10227");
}
use of gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome in project api-core by ca-cwds.
the class R10227Test method testIdentifiedDateValid.
@Test
public void testIdentifiedDateValid() {
OtherAdultsInPlacementHome otherAdultsInPlacementHome = new OtherAdultsInPlacementHome();
otherAdultsInPlacementHome.setBirthDt(LocalDate.now().minus(20, ChronoUnit.YEARS));
otherAdultsInPlacementHome.setIdentfdDt(LocalDate.now().minus(10, ChronoUnit.YEARS));
OtherAdultInHomeEntityAwareDTO otherAdultInHomeEntityAwareDTO = new OtherAdultInHomeEntityAwareDTO();
otherAdultInHomeEntityAwareDTO.setEntity(otherAdultsInPlacementHome);
placementHomeEntityAwareDTO.setOtherAdultInHomeParameterObjects(Collections.singletonList(otherAdultInHomeEntityAwareDTO));
assertValid();
}
use of gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome in project api-core by ca-cwds.
the class R03821Test method checkInvalidStartAndBirthDate.
@Test
public void checkInvalidStartAndBirthDate() throws Exception {
OtherAdultsInPlacementHome otherAdultsInPlacementHome = new OtherAdultsInPlacementHome();
otherAdultsInPlacementHome.setStartDt(LocalDate.now());
otherAdultsInPlacementHome.setBirthDt(LocalDate.now().plus(1, ChronoUnit.DAYS));
placementHomeEntityAwareDTO.getEntity().setOtherAdultsInPlacementHomes(Collections.singletonList(otherAdultsInPlacementHome));
checkRuleViolatedOnce(placementHomeEntityAwareDTO, RULE_NAME);
}
Aggregations