use of gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication in project api-core by ca-cwds.
the class R02761Test method oneMedicalEligibilityApplicationNotValid.
@Test
public void oneMedicalEligibilityApplicationNotValid() throws Exception {
List<MedicalEligibilityApplication> medicalEligibilityApplications = generateListOfValidMedicalEligibilityApplications();
MedicalEligibilityApplication failedApplication = createMedicalEligibilityApplication(-2);
medicalEligibilityApplications.add(failedApplication);
clientEntityAwareDTO.getMedicalEligibilityApplications().addAll(medicalEligibilityApplications);
checkRuleViolatedOnce(RULE_NAME);
}
use of gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication in project api-core by ca-cwds.
the class R02761Test method medicalEligibilityApplicationSameLenghthAsAge.
@Test
public void medicalEligibilityApplicationSameLenghthAsAge() throws Exception {
MedicalEligibilityApplication application = createMedicalEligibilityApplication(0);
clientEntityAwareDTO.getMedicalEligibilityApplications().add(application);
checkRuleSatisfied(RULE_NAME);
}
use of gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication in project api-core by ca-cwds.
the class R02127Test method oneApplicationDateLtBirthdate.
@Test
public void oneApplicationDateLtBirthdate() throws Exception {
List<MedicalEligibilityApplication> medicalEligibilityApplications = generateListOfValidMedicalEligibilityApplications();
MedicalEligibilityApplication failedApplication = createMedicalEligibilityApplication(DEFAULT_BIRTHDATE.minusYears(2).plusMonths(3).plusDays(7));
medicalEligibilityApplications.add(failedApplication);
clientEntityAwareDTO.getMedicalEligibilityApplications().addAll(medicalEligibilityApplications);
checkRuleViolatedOnce(RULE_NAME);
}
use of gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication in project api-core by ca-cwds.
the class R02761Test method birthDateNotSet.
@Test
public void birthDateNotSet() throws Exception {
ChildClient client = new ChildClient();
client.setIdentifier(CLIENT_IDENTIFIER);
clientEntityAwareDTO.setEntity(client);
List<MedicalEligibilityApplication> medicalEligibilityApplications = generateListOfValidMedicalEligibilityApplications();
clientEntityAwareDTO.getMedicalEligibilityApplications().addAll(medicalEligibilityApplications);
checkRuleSatisfied(RULE_NAME);
}
use of gov.ca.cwds.data.legacy.cms.entity.MedicalEligibilityApplication in project api-core by ca-cwds.
the class R02761Test method generateListOfValidMedicalEligibilityApplications.
private static List<MedicalEligibilityApplication> generateListOfValidMedicalEligibilityApplications() {
List<MedicalEligibilityApplication> medicalEligibilityApplications = new ArrayList<>();
MedicalEligibilityApplication medicalEligibilityApplication1 = createMedicalEligibilityApplication(3);
MedicalEligibilityApplication medicalEligibilityApplication2 = createMedicalEligibilityApplication(2);
MedicalEligibilityApplication medicalEligibilityApplication3 = createMedicalEligibilityApplication(5);
medicalEligibilityApplications.addAll(Arrays.asList(medicalEligibilityApplication1, medicalEligibilityApplication2, medicalEligibilityApplication3));
return medicalEligibilityApplications;
}
Aggregations