Search in sources :

Example 31 with ChildClient

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

the class R10104Test method birthDateGraterThanTribalDate.

@Test
public void birthDateGraterThanTribalDate() throws Exception {
    ChildClient childClient = ClientTestUtil.childClient(CLIENT_BIRTH_DAY, ClientTestUtil.CHILD_CLIENT_ID);
    childClient.setTribalCustomaryAdoptionDate(CLIENT_BIRTH_DAY.minusYears(1));
    clientEntityAwareDTO.setEntity(childClient);
    checkRuleViolatedOnce(RULE_NAME);
}
Also used : ChildClient(gov.ca.cwds.data.legacy.cms.entity.ChildClient) Test(org.junit.Test)

Example 32 with ChildClient

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

the class R10104Test method birthDateIsNotPresent.

@Test
public void birthDateIsNotPresent() throws Exception {
    ChildClient childClient = ClientTestUtil.childClient(ClientTestUtil.CHILD_CLIENT_ID);
    childClient.setTribalCustomaryAdoptionDate(CLIENT_BIRTH_DAY);
    clientEntityAwareDTO.setEntity(childClient);
    checkRuleSatisfied(RULE_NAME);
}
Also used : ChildClient(gov.ca.cwds.data.legacy.cms.entity.ChildClient) Test(org.junit.Test)

Example 33 with ChildClient

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

the class R10326Test method testTwoScreeningDatesLtBirthDate.

@Test
public void testTwoScreeningDatesLtBirthDate() throws Exception {
    ChildClient childClient = childClient(SOME_DATE);
    checkRuleViolated(dto(childClient, healthScreening(childClient, SOME_DATE.minusDays(1)), healthScreening(childClient, SOME_DATE.minusDays(2))), RULE_NAME, 2);
}
Also used : ChildClient(gov.ca.cwds.data.legacy.cms.entity.ChildClient) Test(org.junit.Test)

Example 34 with ChildClient

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

the class R10326Test method testScreeningDateLtBirthDate.

@Test
public void testScreeningDateLtBirthDate() throws Exception {
    ChildClient childClient = childClient(SOME_DATE);
    checkRuleViolatedOnce(dto(childClient, healthScreening(childClient, SOME_DATE.minusDays(1))), RULE_NAME);
}
Also used : ChildClient(gov.ca.cwds.data.legacy.cms.entity.ChildClient) Test(org.junit.Test)

Example 35 with ChildClient

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

the class R10326Test method childClient.

public static ChildClient childClient(LocalDate birthDate) {
    ChildClient childClient = new ChildClient();
    childClient.setIdentifier("ChIlDS40FG");
    childClient.setBirthDate(birthDate);
    return childClient;
}
Also used : ChildClient(gov.ca.cwds.data.legacy.cms.entity.ChildClient)

Aggregations

ChildClient (gov.ca.cwds.data.legacy.cms.entity.ChildClient)42 Test (org.junit.Test)32 BaseCwsCmsInMemoryPersistenceTest (gov.ca.cwds.data.legacy.cms.persistence.BaseCwsCmsInMemoryPersistenceTest)7 Client (gov.ca.cwds.data.legacy.cms.entity.Client)5 FCEligibility (gov.ca.cwds.data.legacy.cms.entity.FCEligibility)3 Timestamp (java.sql.Timestamp)3 OptimisticLockException (javax.persistence.OptimisticLockException)2 Session (org.hibernate.Session)2 Before (org.junit.Before)2 ClientOtherEthnicity (gov.ca.cwds.data.legacy.cms.entity.ClientOtherEthnicity)1 MedicalEligibilityApplication (gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication)1