Package io.getunleash
Class FakeUnleash
- java.lang.Object
-
- io.getunleash.FakeUnleash
-
- All Implemented Interfaces:
Unleash
- Direct Known Subclasses:
FakeUnleash
public class FakeUnleash extends Object implements Unleash
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classFakeUnleash.FakeMore
-
Constructor Summary
Constructors Constructor Description FakeUnleash()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisable(String... features)voiddisableAll()voidenable(String... features)voidenableAll()List<String>getFeatureToggleNames()Use more().getFeatureToggleNames() insteadVariantgetVariant(String toggleName)VariantgetVariant(String toggleName, UnleashContext context)VariantgetVariant(String toggleName, UnleashContext context, Variant defaultValue)VariantgetVariant(String toggleName, Variant defaultValue)booleanisEnabled(String toggleName)booleanisEnabled(String toggleName, boolean defaultSetting)booleanisEnabled(String toggleName, UnleashContext context, BiFunction<String,UnleashContext,Boolean> fallbackAction)booleanisEnabled(String toggleName, BiFunction<String,UnleashContext,Boolean> fallbackAction)MoreOperationsmore()voidreset(String... features)voidresetAll()voidsetVariant(String t1, Variant a)
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled(String toggleName, boolean defaultSetting)
-
isEnabled
public boolean isEnabled(String toggleName, UnleashContext context, BiFunction<String,UnleashContext,Boolean> fallbackAction)
-
isEnabled
public boolean isEnabled(String toggleName, BiFunction<String,UnleashContext,Boolean> fallbackAction)
-
getVariant
public Variant getVariant(String toggleName, UnleashContext context)
- Specified by:
getVariantin interfaceUnleash
-
getVariant
public Variant getVariant(String toggleName, UnleashContext context, Variant defaultValue)
- Specified by:
getVariantin interfaceUnleash
-
getVariant
public Variant getVariant(String toggleName)
- Specified by:
getVariantin interfaceUnleash
-
getVariant
public Variant getVariant(String toggleName, Variant defaultValue)
- Specified by:
getVariantin interfaceUnleash
-
getFeatureToggleNames
public List<String> getFeatureToggleNames()
Description copied from interface:UnleashUse more().getFeatureToggleNames() instead- Specified by:
getFeatureToggleNamesin interfaceUnleash- Returns:
- a list of known toggle names
-
more
public MoreOperations more()
-
enableAll
public void enableAll()
-
disableAll
public void disableAll()
-
resetAll
public void resetAll()
-
enable
public void enable(String... features)
-
disable
public void disable(String... features)
-
reset
public void reset(String... features)
-
-