Search in sources :

Example 16 with ChildClient

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

the class R10336Test method testConsentOnFileDateGtBirthDate.

@Test
public void testConsentOnFileDateGtBirthDate() 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 17 with ChildClient

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

the class R10336Test method testConsentOnFileDateNull.

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

Example 18 with ChildClient

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

the class R10336Test 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 19 with ChildClient

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

the class R10339Test method testReferralDateEqBirthDate.

@Test
public void testReferralDateEqBirthDate() throws Exception {
    ChildClient childClient = childClient(SOME_DATE);
    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 20 with ChildClient

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

the class R10339Test method testTwoReferralDateLtBirthDate.

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

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