Search in sources :

Example 1 with MedicalEligibilityApplication

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

the class R02127Test method birthDateNotSet.

@Test
public void birthDateNotSet() throws Exception {
    Client client = new Client();
    client.setIdentifier(CLIENT_IDENTIFIER);
    clientEntityAwareDTO.setEntity(client);
    List<MedicalEligibilityApplication> medicalEligibilityApplications = generateListOfValidMedicalEligibilityApplications();
    clientEntityAwareDTO.getMedicalEligibilityApplications().addAll(medicalEligibilityApplications);
    checkRuleSatisfied(RULE_NAME);
}
Also used : MedicalEligibilityApplication(gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication) ChildClient(gov.ca.cwds.data.legacy.cms.entity.ChildClient) Client(gov.ca.cwds.data.legacy.cms.entity.Client) Test(org.junit.Test)

Example 2 with MedicalEligibilityApplication

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

the class R02127Test method generateListOfValidMedicalEligibilityApplications.

private static List<MedicalEligibilityApplication> generateListOfValidMedicalEligibilityApplications() {
    List<MedicalEligibilityApplication> medicalEligibilityApplications = new ArrayList<>();
    MedicalEligibilityApplication medicalEligibilityApplication1 = createMedicalEligibilityApplication(DEFAULT_BIRTHDATE.plusDays(2));
    MedicalEligibilityApplication medicalEligibilityApplication2 = createMedicalEligibilityApplication(DEFAULT_BIRTHDATE.plusYears(2).minusDays(10));
    MedicalEligibilityApplication medicalEligibilityApplication3 = createMedicalEligibilityApplication(DEFAULT_BIRTHDATE.plusMonths(7));
    medicalEligibilityApplications.addAll(Arrays.asList(medicalEligibilityApplication1, medicalEligibilityApplication2, medicalEligibilityApplication3));
    return medicalEligibilityApplications;
}
Also used : ArrayList(java.util.ArrayList) MedicalEligibilityApplication(gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication)

Example 3 with MedicalEligibilityApplication

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

the class R02127Test method adoptionAgreementTermDateSameAsBirthdate.

@Test
public void adoptionAgreementTermDateSameAsBirthdate() throws Exception {
    MedicalEligibilityApplication application = createMedicalEligibilityApplication(DEFAULT_BIRTHDATE);
    clientEntityAwareDTO.getMedicalEligibilityApplications().add(application);
    checkRuleSatisfied(RULE_NAME);
}
Also used : MedicalEligibilityApplication(gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication) Test(org.junit.Test)

Example 4 with MedicalEligibilityApplication

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

the class R02127Test method createMedicalEligibilityApplication.

private static MedicalEligibilityApplication createMedicalEligibilityApplication(LocalDate adoptionAgreementTermDate) {
    MedicalEligibilityApplication medicalEligibilityApplication = new MedicalEligibilityApplication();
    medicalEligibilityApplication.setAdoptionAgreementTermDate(adoptionAgreementTermDate);
    return medicalEligibilityApplication;
}
Also used : MedicalEligibilityApplication(gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication)

Example 5 with MedicalEligibilityApplication

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

the class R02761Test method createMedicalEligibilityApplication.

private static MedicalEligibilityApplication createMedicalEligibilityApplication(int adjustment) {
    short retroactiveMonthsCount = getAmountOfRetroactiveMonths(adjustment);
    MedicalEligibilityApplication medicalEligibilityApplication = new MedicalEligibilityApplication();
    medicalEligibilityApplication.setRetroactiveMonthsCount(retroactiveMonthsCount);
    return medicalEligibilityApplication;
}
Also used : MedicalEligibilityApplication(gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication)

Aggregations

MedicalEligibilityApplication (gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication)10 Test (org.junit.Test)6 ChildClient (gov.ca.cwds.data.legacy.cms.entity.ChildClient)2 ArrayList (java.util.ArrayList)2 Client (gov.ca.cwds.data.legacy.cms.entity.Client)1