Search in sources :

Example 11 with OtherAdultInHomeEntityAwareDTO

use of gov.ca.cwds.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO 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);
}
Also used : OtherAdultInHomeEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO) OtherAdultsInPlacementHome(gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome) Test(org.junit.Test)

Example 12 with OtherAdultInHomeEntityAwareDTO

use of gov.ca.cwds.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO 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");
}
Also used : OtherAdultInHomeEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO) OtherAdultsInPlacementHome(gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome) Test(org.junit.Test)

Example 13 with OtherAdultInHomeEntityAwareDTO

use of gov.ca.cwds.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO 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();
}
Also used : OtherAdultInHomeEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO) OtherAdultsInPlacementHome(gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome) Test(org.junit.Test)

Aggregations

OtherAdultInHomeEntityAwareDTO (gov.ca.cwds.cms.data.access.dto.OtherAdultInHomeEntityAwareDTO)13 OtherAdultsInPlacementHome (gov.ca.cwds.data.legacy.cms.entity.OtherAdultsInPlacementHome)13 Test (org.junit.Test)13