Skip to content

Commit

Permalink
Merge pull request #77 from DepartmentOfHealth-htbhf/feature/eligibil…
Browse files Browse the repository at this point in the history
…ity_override_children_dob

added list of children dobs parameter to eligibility override test data factory
  • Loading branch information
AmarkumarJagtap authored Jan 20, 2020
2 parents 18fd0c7 + c60fb75 commit e7a9c41
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import uk.gov.dhsc.htbhf.eligibility.model.CombinedIdentityAndEligibilityResponse;

import java.time.LocalDate;
import java.util.Collections;
import java.util.List;

import static java.util.Collections.emptyList;
Expand Down Expand Up @@ -166,14 +165,16 @@ public static CombinedIdentityAndEligibilityResponse aCombinedIdentityAndEligibi
}
}

public static CombinedIdentityAndEligibilityResponse aCombinedIdentityAndEligibilityResponseWithOverride(EligibilityOutcome overrideEligibilityStatus) {
public static CombinedIdentityAndEligibilityResponse aCombinedIdentityAndEligibilityResponseWithOverride(
EligibilityOutcome overrideEligibilityStatus,
List<LocalDate> childrenDob) {
VerificationOutcome matchOutcome = overrideEligibilityStatus == EligibilityOutcome.CONFIRMED
? VerificationOutcome.MATCHED
: VerificationOutcome.NOT_SET;
return CombinedIdentityAndEligibilityResponse.builder()
.identityStatus(IdentityOutcome.MATCHED)
.eligibilityStatus(overrideEligibilityStatus)
.dobOfChildrenUnder4(Collections.emptyList())
.dobOfChildrenUnder4(childrenDob)
.pregnantChildDOBMatch(matchOutcome)
.addressLine1Match(matchOutcome)
.emailAddressMatch(matchOutcome)
Expand Down

0 comments on commit e7a9c41

Please sign in to comment.