Search in sources :

Example 1 with OtherAdultInHomeEntityAwareDTO

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");
}
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 2 with OtherAdultInHomeEntityAwareDTO

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");
}
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 3 with OtherAdultInHomeEntityAwareDTO

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);
}
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 4 with OtherAdultInHomeEntityAwareDTO

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);
}
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 5 with OtherAdultInHomeEntityAwareDTO

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);
}
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