use of gov.ca.cwds.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO 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.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO 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.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO 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.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO 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);
}
use of gov.ca.cwds.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO in project api-core by ca-cwds.
the class R00180Test method checkStartAndEndDateNullValid.
@Test
public void checkStartAndEndDateNullValid() throws Exception {
OtherAdultsInPlacementHome otherAdultsInPlacementHome = new OtherAdultsInPlacementHome();
otherAdultsInPlacementHome.setStartDt(null);
otherAdultsInPlacementHome.setEndDt(null);
OtherAdultInHomeEntityAwareDTO otherAdultInHomeEntityAwareDTO = new OtherAdultInHomeEntityAwareDTO();
otherAdultInHomeEntityAwareDTO.setEntity(otherAdultsInPlacementHome);
placementHomeEntityAwareDTO.getOtherAdultInHomeParameterObjects().add(otherAdultInHomeEntityAwareDTO);
checkRuleValid(placementHomeEntityAwareDTO, RULE_NAME);
}
Aggregations