use of gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome in project api-core by ca-cwds.
the class R03821Test method checkValidStartAndBirthDate.
@Test
public void checkValidStartAndBirthDate() throws Exception {
OtherAdultsInPlacementHome otherAdultsInPlacementHome = new OtherAdultsInPlacementHome();
otherAdultsInPlacementHome.setStartDt(LocalDate.now());
otherAdultsInPlacementHome.setBirthDt(LocalDate.now().minus(1, ChronoUnit.DAYS));
placementHomeEntityAwareDTO.getEntity().setOtherAdultsInPlacementHomes(Collections.singletonList(otherAdultsInPlacementHome));
checkRuleValid(placementHomeEntityAwareDTO, RULE_NAME);
}
use of gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome in project api-core by ca-cwds.
the class R04966Test method testOtherAdultsNameValid.
@Test
public void testOtherAdultsNameValid() {
OtherAdultsInPlacementHome otherAdultsInPlacementHome = new OtherAdultsInPlacementHome();
otherAdultsInPlacementHome.setOthAdltnm(" A v f ");
OtherAdultInHomeEntityAwareDTO otherAdultInHomeEntityAwareDTO = new OtherAdultInHomeEntityAwareDTO();
otherAdultInHomeEntityAwareDTO.setEntity(otherAdultsInPlacementHome);
placementHomeEntityAwareDTO.setOtherAdultInHomeParameterObjects(Collections.singletonList(otherAdultInHomeEntityAwareDTO));
assertValid("R-04966");
}
use of gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome in project api-core by ca-cwds.
the class R04966Test method testOtherAdultsNameInvalid.
@Test
public void testOtherAdultsNameInvalid() {
OtherAdultsInPlacementHome otherAdultsInPlacementHome = new OtherAdultsInPlacementHome();
otherAdultsInPlacementHome.setOthAdltnm("Valid2 Nam31 Jr. 1");
OtherAdultInHomeEntityAwareDTO otherAdultInHomeEntityAwareDTO = new OtherAdultInHomeEntityAwareDTO();
otherAdultInHomeEntityAwareDTO.setEntity(otherAdultsInPlacementHome);
placementHomeEntityAwareDTO.setOtherAdultInHomeParameterObjects(Collections.singletonList(otherAdultInHomeEntityAwareDTO));
check("R-04966");
}
use of gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome in project api-core by ca-cwds.
the class R00179Test method checkBirthDateInFuture.
@Test
public void checkBirthDateInFuture() throws Exception {
OtherAdultsInPlacementHome otherAdultsInPlacementHome = new OtherAdultsInPlacementHome();
otherAdultsInPlacementHome.setBirthDt(LocalDate.now().plus(1, ChronoUnit.DAYS));
OtherAdultInHomeEntityAwareDTO otherAdultInHomeEntityAwareDTO = new OtherAdultInHomeEntityAwareDTO();
otherAdultInHomeEntityAwareDTO.setEntity(otherAdultsInPlacementHome);
placementHomeEntityAwareDTO.getOtherAdultInHomeParameterObjects().add(otherAdultInHomeEntityAwareDTO);
checkRuleViolatedOnce(placementHomeEntityAwareDTO, RULE_NAME);
}
use of gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome in project api-core by ca-cwds.
the class R00180Test method checkEndDateNullValid.
@Test
public void checkEndDateNullValid() throws Exception {
OtherAdultsInPlacementHome otherAdultsInPlacementHome = new OtherAdultsInPlacementHome();
otherAdultsInPlacementHome.setStartDt(LocalDate.now().minus(10, ChronoUnit.YEARS));
otherAdultsInPlacementHome.setEndDt(null);
OtherAdultInHomeEntityAwareDTO otherAdultInHomeEntityAwareDTO = new OtherAdultInHomeEntityAwareDTO();
otherAdultInHomeEntityAwareDTO.setEntity(otherAdultsInPlacementHome);
placementHomeEntityAwareDTO.getOtherAdultInHomeParameterObjects().add(otherAdultInHomeEntityAwareDTO);
checkRuleValid(placementHomeEntityAwareDTO, RULE_NAME);
}
Aggregations