Is your feature request related to a problem? Please describe.
Switcher can also have Strategies that can give us more granular verification for feature flags.
When testing more complex cases using Strategies, we want to provide the condition in which the Switcher will return true or false.
Describe the solution you'd like
Include a CriteriaResponse map of criteria (when), that will be checked during Switcher evaluation.
This map will toggle the result assumed when evaluating the Switcher.
This feature can be used in both ways, with SwitcherExecutor or SwitcherTest annotations.
SwitcherExecutor
void shouldTestSomething() {
SwitcherExecutor.assume(MY_SWITCHER, true)
.when(StrategyValidator.VALUE, "Value1");
}
SwitcherTest
@SwitcherTest(key = MY_SWITCHER, when = {
@SwitcherTestWhen(strategy = StrategyValidator.VALUE, input = "Value1")
})
void shouldTestSomething() {
...
}
Is your feature request related to a problem? Please describe.
Switcher can also have Strategies that can give us more granular verification for feature flags.
When testing more complex cases using Strategies, we want to provide the condition in which the Switcher will return true or false.
Describe the solution you'd like
Include a CriteriaResponse map of criteria (when), that will be checked during Switcher evaluation.
This map will toggle the result assumed when evaluating the Switcher.
This feature can be used in both ways, with SwitcherExecutor or SwitcherTest annotations.
SwitcherExecutor
SwitcherTest