Search in sources :

Example 1 with OtherAdultsInPlacementHome

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

Example 2 with OtherAdultsInPlacementHome

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

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

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

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

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