Package io.getunleash
Class FakeUnleash
java.lang.Object
io.getunleash.FakeUnleash
- All Implemented Interfaces:
Unleash
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeprecatedGetVariant
(String toggleName, UnleashContext context) deprecatedGetVariant
(String toggleName, UnleashContext context, Variant defaultValue) void
void
void
disableAllExcept
(String... excludedFeatures) void
void
void
enableAllExcept
(String... excludedFeatures) Use more().getFeatureToggleNames() insteadgetVariant
(String toggleName) getVariant
(String toggleName, UnleashContext context) getVariant
(String toggleName, UnleashContext context, Variant defaultValue) getVariant
(String toggleName, Variant defaultValue) boolean
boolean
isEnabled
(String toggleName, UnleashContext context, BiPredicate<String, UnleashContext> fallbackAction) boolean
isEnabled
(String toggleName, BiPredicate<String, UnleashContext> fallbackAction) more()
void
void
resetAll()
void
setVariant
(String t1, Variant a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.getunleash.Unleash
deprecatedGetVariant, deprecatedGetVariant, isEnabled, isEnabled, isEnabled, shutdown
-
Constructor Details
-
FakeUnleash
public FakeUnleash()
-
-
Method Details
-
isEnabled
-
isEnabled
public boolean isEnabled(String toggleName, UnleashContext context, BiPredicate<String, UnleashContext> fallbackAction) -
isEnabled
-
getVariant
- Specified by:
getVariant
in interfaceUnleash
-
getVariant
- Specified by:
getVariant
in interfaceUnleash
-
getVariant
- Specified by:
getVariant
in interfaceUnleash
-
getVariant
- Specified by:
getVariant
in interfaceUnleash
-
getFeatureToggleNames
Description copied from interface:Unleash
Use more().getFeatureToggleNames() instead- Specified by:
getFeatureToggleNames
in interfaceUnleash
- Returns:
- a list of known toggle names
-
more
-
enableAll
public void enableAll() -
enableAllExcept
-
disableAll
public void disableAll() -
disableAllExcept
-
deprecatedGetVariant
- Specified by:
deprecatedGetVariant
in interfaceUnleash
-
deprecatedGetVariant
public Variant deprecatedGetVariant(String toggleName, UnleashContext context, Variant defaultValue) - Specified by:
deprecatedGetVariant
in interfaceUnleash
-
resetAll
public void resetAll() -
enable
-
disable
-
reset
-
setVariant
-