Search in sources :

Example 1 with OtherChildrenInPlacementHome

use of gov.ca.cwds.data.legacy.cms.entity.OtherChildrenInPlacementHome in project api-core by ca-cwds.

the class R04966Test method testOtherChildrenNameInvalid.

@Test
public void testOtherChildrenNameInvalid() {
    OtherChildrenInPlacementHome otherChildrenInPlacementHome = new OtherChildrenInPlacementHome();
    otherChildrenInPlacementHome.setOthchldNm("Valid2 Nam31 Jr. 1");
    OtherChildInHomeEntityAwareDTO otherChildInHomeEntityAwareDTO = new OtherChildInHomeEntityAwareDTO();
    otherChildInHomeEntityAwareDTO.setEntity(otherChildrenInPlacementHome);
    placementHomeEntityAwareDTO.setOtherChildrenInHomeParameterObjects(Collections.singletonList(otherChildInHomeEntityAwareDTO));
    check("R-04966");
}
Also used : OtherChildInHomeEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.OtherChildInHomeEntityAwareDTO) OtherChildrenInPlacementHome(gov.ca.cwds.data.legacy.cms.entity.OtherChildrenInPlacementHome) Test(org.junit.Test)

Example 2 with OtherChildrenInPlacementHome

use of gov.ca.cwds.data.legacy.cms.entity.OtherChildrenInPlacementHome in project api-core by ca-cwds.

the class R00181Test method before.

@Before
public void before() {
    OtherChildInHomeEntityAwareDTO otherChild1 = new OtherChildInHomeEntityAwareDTO();
    otherChild1.setEntity(new OtherChildrenInPlacementHome());
    otherChild1.getEntity().setBirthDt(LocalDate.now().minusYears(4));
    OtherChildInHomeEntityAwareDTO otherChild2 = new OtherChildInHomeEntityAwareDTO();
    otherChild2.setEntity(new OtherChildrenInPlacementHome());
    otherChild2.getEntity().setBirthDt(LocalDate.now().minusYears(5));
    List<OtherChildInHomeEntityAwareDTO> otherChildren = new ArrayList<>(2);
    otherChildren.add(otherChild1);
    otherChildren.add(otherChild2);
    placementHomeEntityAwareDTO.setOtherChildrenInHomeParameterObjects(otherChildren);
}
Also used : OtherChildInHomeEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.OtherChildInHomeEntityAwareDTO) ArrayList(java.util.ArrayList) OtherChildrenInPlacementHome(gov.ca.cwds.data.legacy.cms.entity.OtherChildrenInPlacementHome) Before(org.junit.Before)

Example 3 with OtherChildrenInPlacementHome

use of gov.ca.cwds.data.legacy.cms.entity.OtherChildrenInPlacementHome in project api-core by ca-cwds.

the class R00182Test method before.

@Before
public void before() {
    OtherChildInHomeEntityAwareDTO otherChild1 = new OtherChildInHomeEntityAwareDTO();
    otherChild1.setEntity(new OtherChildrenInPlacementHome());
    otherChild1.getEntity().setBirthDt(LocalDate.now());
    OtherChildInHomeEntityAwareDTO otherChild2 = new OtherChildInHomeEntityAwareDTO();
    otherChild2.setEntity(new OtherChildrenInPlacementHome());
    otherChild2.getEntity().setBirthDt(LocalDate.now().minusYears(5));
    List<OtherChildInHomeEntityAwareDTO> otherChildren = new ArrayList<>(2);
    otherChildren.add(otherChild1);
    otherChildren.add(otherChild2);
    placementHomeEntityAwareDTO.setOtherChildrenInHomeParameterObjects(otherChildren);
}
Also used : OtherChildInHomeEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.OtherChildInHomeEntityAwareDTO) ArrayList(java.util.ArrayList) OtherChildrenInPlacementHome(gov.ca.cwds.data.legacy.cms.entity.OtherChildrenInPlacementHome) Before(org.junit.Before)

Example 4 with OtherChildrenInPlacementHome

use of gov.ca.cwds.data.legacy.cms.entity.OtherChildrenInPlacementHome in project api-core by ca-cwds.

the class R04966Test method testOtherChildrenNameValid.

@Test
public void testOtherChildrenNameValid() {
    OtherChildrenInPlacementHome otherChildrenInPlacementHome = new OtherChildrenInPlacementHome();
    otherChildrenInPlacementHome.setOthchldNm("Valid2 Nam31 Jr. 1a");
    OtherChildInHomeEntityAwareDTO otherChildInHomeEntityAwareDTO = new OtherChildInHomeEntityAwareDTO();
    otherChildInHomeEntityAwareDTO.setEntity(otherChildrenInPlacementHome);
    placementHomeEntityAwareDTO.setOtherChildrenInHomeParameterObjects(Collections.singletonList(otherChildInHomeEntityAwareDTO));
    assertValid("R-04966");
}
Also used : OtherChildInHomeEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.OtherChildInHomeEntityAwareDTO) OtherChildrenInPlacementHome(gov.ca.cwds.data.legacy.cms.entity.OtherChildrenInPlacementHome) Test(org.junit.Test)

Aggregations

OtherChildInHomeEntityAwareDTO (gov.ca.cwds.cms.data.access.dto.OtherChildInHomeEntityAwareDTO)4 OtherChildrenInPlacementHome (gov.ca.cwds.data.legacy.cms.entity.OtherChildrenInPlacementHome)4 ArrayList (java.util.ArrayList)2 Before (org.junit.Before)2 Test (org.junit.Test)2