-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CCAP-509] adding additional counties behind enableSDA15Providers flag #1096
Conversation
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.boot.test.util.TestPropertyValues; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anahar-cfa - you are importing a lot of classes that are not used anywhere on the tests. Can you remove those?
Also - If you are testing that the number of active county options is 18 when the flag is on. It would make sense to also confirm that those inactive counties are NOT included when the feature flag is off.
countyOptions.add(MCHENRY); | ||
countyOptions.add(OGLE); | ||
countyOptions.add(WHITESIDE); | ||
if (enableSDA15Providers) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than hard coding this, I think it makes sense to use this logic:
public static Boolean isValidZipcodeOption(String zipcode, Boolean includeSDA15) {
return Arrays.stream(ZipcodeOption.values()).filter(zip -> zip.active)
.filter(zip -> includeSDA15 ? zip.caseloadCode.equals("BB") || zip.caseloadCode.equals("QQ")
: zip.caseloadCode.equals("BB")).anyMatch(zip -> zip.value.equals(zipcode));
}
to determine whether the county is valid or not.
We don't want the two sets of data to get our of sync.
π Jira ticket
βοΈ Description
π· Design reference
β Completion tasks