Skip to content
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

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

anahar-cfa
Copy link
Collaborator

πŸ”— Jira ticket

✍️ Description

πŸ“· Design reference

βœ… Completion tasks

  • Added relevant tests
  • Meets acceptance criteria

@enyia21 enyia21 temporarily deployed to il-gcc-ccap-509-additio-cpaqzr January 29, 2025 20:16 Inactive
@anahar-cfa anahar-cfa changed the title CCAP-509, adding additional counties behind enableSDA15Providers flag [CCAP-509] adding additional counties behind enableSDA15Providers flag Jan 29, 2025
@anahar-cfa anahar-cfa requested review from analoo and cram-cfa January 29, 2025 22:07
@enyia21 enyia21 temporarily deployed to il-gcc-ccap-509-additio-cpaqzr January 31, 2025 22:55 Inactive
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;
Copy link
Contributor

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) {
Copy link
Contributor

@analoo analoo Feb 4, 2025

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.

@anahar-cfa anahar-cfa merged commit ec36947 into main Feb 6, 2025
5 checks passed
@anahar-cfa anahar-cfa deleted the CCAP-509-additional-counties branch February 6, 2025 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants