use of gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO in project api-core by ca-cwds.
the class R10293Test method rule10293_violated_whenOneOfTwoDasHistoriesIsBeforeDOB.
@Test
public void rule10293_violated_whenOneOfTwoDasHistoriesIsBeforeDOB() throws DroolsException {
// given
final Client client = client(SOME_DATE);
final SchoolOriginHistory history0 = schoolOriginHistory(SOME_DATE.plusDays(100));
final SchoolOriginHistory history1 = schoolOriginHistory(SOME_DATE.minusDays(100));
final ChildClientEntityAwareDTO input = dto(client, history0, history1);
// when + then
checkRuleViolatedOnce(input, RULE_NAME);
}
use of gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO in project api-core by ca-cwds.
the class R10538Test method rule10538_violatedTwice_whenTwoDasHistoriesBeforeDOB.
@Test
public void rule10538_violatedTwice_whenTwoDasHistoriesBeforeDOB() throws DroolsException {
// given
final Client client = client(SOME_DATE);
final DasHistory dasHistory0 = dasHistory(SOME_DATE.minusDays(1));
final DasHistory dasHistory1 = dasHistory(SOME_DATE.minusDays(100));
final ChildClientEntityAwareDTO input = dto(client, dasHistory0, dasHistory1);
// when + then
checkRuleViolated(input, RULE_NAME, 2);
}
use of gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO in project api-core by ca-cwds.
the class R10538Test method rule10538_violated_whenOneOfTwoDasHistoriesIsBeforeDOB.
@Test
public void rule10538_violated_whenOneOfTwoDasHistoriesIsBeforeDOB() throws DroolsException {
// given
final Client client = client(SOME_DATE);
final DasHistory dasHistory0 = dasHistory(SOME_DATE.plusDays(100));
final DasHistory dasHistory1 = dasHistory(SOME_DATE.minusDays(100));
final ChildClientEntityAwareDTO input = dto(client, dasHistory0, dasHistory1);
// when + then
checkRuleViolatedOnce(input, RULE_NAME);
}
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, PaternityDetail... paternityDetails) {
ChildClientEntityAwareDTO dto = new ChildClientEntityAwareDTO();
dto.setEntity(childClient);
dto.setPaternityDetails(Arrays.asList(paternityDetails));
return dto;
}
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, DasHistory... dasHistories) {
ChildClientEntityAwareDTO dto = new ChildClientEntityAwareDTO();
dto.setEntity(client);
dto.getDasHistories().addAll(Arrays.asList(dasHistories));
return dto;
}
Aggregations