Search in sources :

Example 1 with ChildClientEntityAwareDTO

use of gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO in project api-core by ca-cwds.

the class ClientTestUtil method dto.

public static ChildClientEntityAwareDTO dto(ChildClient childClient, ParentalRightsTermination... terminations) {
    ChildClientEntityAwareDTO dto = new ChildClientEntityAwareDTO();
    dto.setEntity(childClient);
    dto.getParentalRightsTerminations().addAll(Arrays.asList(terminations));
    return dto;
}
Also used : ChildClientEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO)

Example 2 with ChildClientEntityAwareDTO

use of gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO in project api-core by ca-cwds.

the class ClientTestUtil method dto.

public static ChildClientEntityAwareDTO dto(Client client, HealthInterventionPlan... plans) {
    ChildClientEntityAwareDTO dto = new ChildClientEntityAwareDTO();
    dto.setEntity(client);
    dto.getActiveHealthInterventionPlans().addAll(Arrays.asList(plans));
    return dto;
}
Also used : ChildClientEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO)

Example 3 with ChildClientEntityAwareDTO

use of gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO in project api-core by ca-cwds.

the class ClientTestUtil method dto.

public static ChildClientEntityAwareDTO dto(Client client) {
    ChildClientEntityAwareDTO dto = new ChildClientEntityAwareDTO();
    dto.setEntity(client);
    return dto;
}
Also used : ChildClientEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO)

Example 4 with ChildClientEntityAwareDTO

use of gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO in project api-core by ca-cwds.

the class ClientTestUtil method dto.

public static ChildClientEntityAwareDTO dto(Client client, SafetyAlert... safetyAlerts) {
    ChildClientEntityAwareDTO dto = new ChildClientEntityAwareDTO();
    dto.setEntity(client);
    dto.getSafetyAlerts().addAll(Arrays.asList(safetyAlerts));
    return dto;
}
Also used : ChildClientEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO)

Example 5 with ChildClientEntityAwareDTO

use of gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO in project api-core by ca-cwds.

the class R09729Test method rule09729_violated_whenSingleAlertBeforeDOB.

@Test
public void rule09729_violated_whenSingleAlertBeforeDOB() throws DroolsException {
    // given
    final Client client = client(SOME_DATE);
    final SafetyAlert safetyAlert = safetyAlert(THIRD_ID, SOME_DATE.minusDays(1));
    final ChildClientEntityAwareDTO input = dto(client, safetyAlert);
    // when + then
    checkRuleViolatedOnce(input, RULE_NAME);
}
Also used : SafetyAlert(gov.ca.cwds.data.legacy.cms.entity.SafetyAlert) Client(gov.ca.cwds.data.legacy.cms.entity.Client) ChildClientEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO) Test(org.junit.Test)

Aggregations

ChildClientEntityAwareDTO (gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO)31 Client (gov.ca.cwds.data.legacy.cms.entity.Client)21 Test (org.junit.Test)21 DasHistory (gov.ca.cwds.data.legacy.cms.entity.DasHistory)6 SafetyAlert (gov.ca.cwds.data.legacy.cms.entity.SafetyAlert)6 SchoolOriginHistory (gov.ca.cwds.data.legacy.cms.entity.SchoolOriginHistory)6