Search in sources :

Example 36 with ChildClient

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

the class R10339Test method testReferralDateLtBirthDate.

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

Example 37 with ChildClient

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

the class R10339Test method testReferralDateGtBirthDate.

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

Example 38 with ChildClient

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

the class R10339Test method testBirthDateNull.

@Test
public void testBirthDateNull() throws Exception {
    ChildClient childClient = childClient(null);
    checkRuleSatisfied(dto(childClient, healthReferral(childClient, SOME_DATE)), RULE_NAME);
}
Also used : ChildClient(gov.ca.cwds.data.legacy.cms.entity.ChildClient) Test(org.junit.Test)

Example 39 with ChildClient

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

the class R10339Test 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)

Example 40 with ChildClient

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

the class ClientTestUtil method childClient.

public static ChildClient childClient(LocalDate birthDate, String clientId) {
    ChildClient childClient = new ChildClient();
    if (StringUtils.isEmpty(clientId)) {
        childClient.setIdentifier(CHILD_CLIENT_ID);
    } else {
        childClient.setIdentifier(clientId);
    }
    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