use of gov.ca.cwds.cals.Constants.Validation.Business.Code.REQUIRED_MINOR_CHILD_FINANCIALLY_SUPPORTED in project cals-api by ca-cwds.
the class RFA1aRequiredFieldsValidationTest method validateRequiredFieldsForMinorChild.
@Test
public void validateRequiredFieldsForMinorChild() throws Exception {
RFA1aFormDTO rfa1aForm = prepareValidForm();
ApplicantDTO firstApplicant = rfa1aForm.getFirstApplicant();
MinorChildDTO minorChild = buildEmptyMinorChild(firstApplicant);
minorChild.getRelationshipToApplicants().get(0).setApplicantId(null);
minorChild = minorChildHelper.postMinorChild(rfa1aForm.getId(), minorChild);
List<IssueDetails> cvIssues = getIssueDetails(rfa1aForm);
// "CV000020";
Assert.assertTrue(cvIssues.stream().anyMatch(id -> id.getCode().equals(REQUIRED_MINOR_CHILD_DATE_OF_BIRTH)));
// "CV000021";
Assert.assertTrue(cvIssues.stream().anyMatch(id -> id.getCode().equals(REQUIRED_MINOR_CHILD_GENDER)));
// "CV000022";
Assert.assertTrue(cvIssues.stream().anyMatch(id -> id.getCode().equals(REQUIRED_MINOR_CHILD_FINANCIALLY_SUPPORTED)));
// "CV000023";
Assert.assertTrue(cvIssues.stream().anyMatch(id -> id.getCode().equals(REQUIRED_MINOR_CHILD_ADOPTED)));
// "CV000024";
Assert.assertTrue(cvIssues.stream().anyMatch(id -> id.getCode().equals(REQUIRED_MINOR_CHILD_RELATIONSHIP_APPLICANT_ID)));
}
Aggregations