Search in sources :

Example 1 with SchoolOriginHistory

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

the class R10293Test method rule10293_violatedTwice_whenTwoDasHistoriesBeforeDOB.

@Test
public void rule10293_violatedTwice_whenTwoDasHistoriesBeforeDOB() throws DroolsException {
    // given
    final Client client = client(SOME_DATE);
    final SchoolOriginHistory history0 = schoolOriginHistory(SOME_DATE.minusDays(1));
    final SchoolOriginHistory history1 = schoolOriginHistory(SOME_DATE.minusDays(100));
    final ChildClientEntityAwareDTO input = dto(client, history0, history1);
    // when + then
    checkRuleViolated(input, RULE_NAME, 2);
}
Also used : SchoolOriginHistory(gov.ca.cwds.data.legacy.cms.entity.SchoolOriginHistory) Client(gov.ca.cwds.data.legacy.cms.entity.Client) ChildClientEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO) Test(org.junit.Test)

Example 2 with SchoolOriginHistory

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

the class R10293Test method rule10293_violated_whenSingleDasHistoryBeforeDOB.

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

Example 3 with SchoolOriginHistory

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

the class R10293Test method rule10293_satisfied_whenSingleDasHistoryAfterDOB.

@Test
public void rule10293_satisfied_whenSingleDasHistoryAfterDOB() throws DroolsException {
    // given
    final Client client = client(SOME_DATE);
    final SchoolOriginHistory history = schoolOriginHistory(SOME_DATE.plusDays(100));
    final ChildClientEntityAwareDTO input = dto(client, history);
    // when + then
    checkRuleSatisfied(input, RULE_NAME);
}
Also used : SchoolOriginHistory(gov.ca.cwds.data.legacy.cms.entity.SchoolOriginHistory) Client(gov.ca.cwds.data.legacy.cms.entity.Client) ChildClientEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO) Test(org.junit.Test)

Example 4 with SchoolOriginHistory

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

the class R10293Test method rule10293_satisfied_whenTwoDasHistoriesAfterDOB.

@Test
public void rule10293_satisfied_whenTwoDasHistoriesAfterDOB() throws DroolsException {
    // given
    final Client client = client(SOME_DATE);
    final SchoolOriginHistory history0 = schoolOriginHistory(SOME_DATE.plusDays(1));
    final SchoolOriginHistory history1 = schoolOriginHistory(SOME_DATE.plusDays(100));
    final ChildClientEntityAwareDTO input = dto(client, history0, history1);
    // when + then
    checkRuleSatisfied(input, RULE_NAME);
}
Also used : SchoolOriginHistory(gov.ca.cwds.data.legacy.cms.entity.SchoolOriginHistory) Client(gov.ca.cwds.data.legacy.cms.entity.Client) ChildClientEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO) Test(org.junit.Test)

Example 5 with SchoolOriginHistory

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

the class R10293Test method rule10293_satisfied_whenSingleDasHistoryOnDOB.

@Test
public void rule10293_satisfied_whenSingleDasHistoryOnDOB() throws DroolsException {
    // given
    final Client client = client(SOME_DATE);
    final SchoolOriginHistory history = schoolOriginHistory(SOME_DATE);
    final ChildClientEntityAwareDTO input = dto(client, history);
    // when + then
    checkRuleSatisfied(input, RULE_NAME);
}
Also used : SchoolOriginHistory(gov.ca.cwds.data.legacy.cms.entity.SchoolOriginHistory) Client(gov.ca.cwds.data.legacy.cms.entity.Client) ChildClientEntityAwareDTO(gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO) Test(org.junit.Test)

Aggregations

SchoolOriginHistory (gov.ca.cwds.data.legacy.cms.entity.SchoolOriginHistory)8 Test (org.junit.Test)7 ChildClientEntityAwareDTO (gov.ca.cwds.cms.data.access.dto.ChildClientEntityAwareDTO)6 Client (gov.ca.cwds.data.legacy.cms.entity.Client)6 BaseCwsCmsInMemoryPersistenceTest (gov.ca.cwds.data.legacy.cms.persistence.BaseCwsCmsInMemoryPersistenceTest)1