Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Oct 10, 2025

This pull request improves how Switcher Keys are registered and validated, enhances documentation, and refines test coverage and configuration. The key changes include stricter validation for Switcher Keys to prevent null or empty values, updates to usage documentation, and adjustments to test cases to ensure correct behavior and coverage.

Switcher Key registration and validation:

  • Switcher Keys are now registered using their actual string values (not field names), and the code throws a SwitcherContextException if a key is null or empty, ensuring that only valid keys are used. (SwitcherContextBase.java) [1] [2]
  • Added new tests to verify that null or empty Switcher Keys cause appropriate exceptions, increasing reliability. (SwitcherFail3Test.java)

Documentation improvements:

  • Updated the README.md to clarify how to define Switcher Keys and configure the context, including best practices for key declaration. [1] [2]

Test data update:

  • Added a new feature configuration (USECASE1) to the test snapshot fixture to support new key usage in tests. (fixture1.json)

@petruki petruki added this to the v2.5.0 milestone Oct 10, 2025
@petruki petruki self-assigned this Oct 10, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 10, 2025

@petruki petruki merged commit b284848 into master-2 Oct 10, 2025
9 checks passed
@petruki petruki deleted the feat_368 branch October 10, 2025 22:05
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.

2 participants