Fake Feature Flags
open class FakeFeatureFlags : FeatureFlags, LegacyFeatureFlags, DynamicConfig, StrongFeatureFlags, Configurable<FakeFeatureFlagsConfig>
In-memory test implementation of FeatureFlags that allows flags to be overridden.
Constructors
Functions
Link copied to clipboard
Configures the feature flags values from supplied config.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <Flag : JsonFeatureFlag<T>, T : Any> override(value: T, noinline matcher: (Flag) -> Boolean = { _ -> true }): FakeFeatureFlags
inline fun <Flag : EnumFeatureFlag<T>, T : Enum<T>> override(value: T, noinline matcher: (Flag) -> Boolean = { _ -> true }): FakeFeatureFlags
inline fun <Flag : BooleanFeatureFlag> override(value: Boolean, noinline matcher: (Flag) -> Boolean = { _ -> true }): FakeFeatureFlags
inline fun <Flag : DoubleFeatureFlag> override(value: Double, noinline matcher: (Flag) -> Boolean = { _ -> true }): FakeFeatureFlags
inline fun <Flag : IntFeatureFlag> override(value: Int, noinline matcher: (Flag) -> Boolean = { _ -> true }): FakeFeatureFlags
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T> overrideKey(feature: Feature, key: String, value: T, attributes: Attributes = defaultAttributes)
fun overrideKey(feature: Feature, key: String, value: Boolean, attributes: Attributes = defaultAttributes)
fun overrideKey(feature: Feature, key: String, value: Double, attributes: Attributes = defaultAttributes)
fun overrideKey(feature: Feature, key: String, value: Enum<*>, attributes: Attributes = defaultAttributes)
fun overrideKey(feature: Feature, key: String, value: Int, attributes: Attributes = defaultAttributes)
fun overrideKey(feature: Feature, key: String, value: String, attributes: Attributes = defaultAttributes)
Link copied to clipboard
inline fun <T> overrideKeyJson(feature: Feature, key: String, value: T, attributes: Attributes = defaultAttributes)
Link copied to clipboard
fun overrideKeyJsonString(feature: Feature, key: String, value: String, attributes: Attributes = defaultAttributes)
Link copied to clipboard
open override fun trackBoolean(feature: Feature, executor: Executor, tracker: (Boolean) -> Unit): TrackerReference
open override fun trackBoolean(feature: Feature, key: String, executor: Executor, tracker: (Boolean) -> Unit): TrackerReference
open override fun trackBoolean(feature: Feature, key: String, attributes: Attributes, executor: Executor, tracker: (Boolean) -> Unit): TrackerReference
Link copied to clipboard
open override fun trackDouble(feature: Feature, executor: Executor, tracker: (Double) -> Unit): TrackerReference
open override fun trackDouble(feature: Feature, key: String, executor: Executor, tracker: (Double) -> Unit): TrackerReference
open override fun trackDouble(feature: Feature, key: String, attributes: Attributes, executor: Executor, tracker: (Double) -> Unit): TrackerReference
Link copied to clipboard
Link copied to clipboard
open override fun trackString(feature: Feature, executor: Executor, tracker: (String) -> Unit): TrackerReference
open override fun trackString(feature: Feature, key: String, executor: Executor, tracker: (String) -> Unit): TrackerReference
open override fun trackString(feature: Feature, key: String, attributes: Attributes, executor: Executor, tracker: (String) -> Unit): TrackerReference