Class UserAwareFakeUnleash

  • All Implemented Interfaces:
    no.finn.unleash.Unleash

    public class UserAwareFakeUnleash
    extends Object
    implements no.finn.unleash.Unleash
    Note implementing your own Unleash isn't typically needed. But for the purpose of this demo I am creating one so we can use FakeUnleash but still demonstrate using a Context.
    • Constructor Detail

      • UserAwareFakeUnleash

        public UserAwareFakeUnleash​(no.finn.unleash.UnleashContextProvider contextProvider)
    • Method Detail

      • enable

        public void enable​(String featureName)
      • isEnabled

        public boolean isEnabled​(String toggleName)
        Specified by:
        isEnabled in interface no.finn.unleash.Unleash
      • isEnabled

        public boolean isEnabled​(String s,
                                 boolean b)
        Specified by:
        isEnabled in interface no.finn.unleash.Unleash
      • getVariant

        public no.finn.unleash.Variant getVariant​(String s,
                                                  no.finn.unleash.UnleashContext unleashContext)
        Specified by:
        getVariant in interface no.finn.unleash.Unleash
      • getVariant

        public no.finn.unleash.Variant getVariant​(String s,
                                                  no.finn.unleash.UnleashContext unleashContext,
                                                  no.finn.unleash.Variant variant)
        Specified by:
        getVariant in interface no.finn.unleash.Unleash
      • getVariant

        public no.finn.unleash.Variant getVariant​(String s)
        Specified by:
        getVariant in interface no.finn.unleash.Unleash
      • getVariant

        public no.finn.unleash.Variant getVariant​(String s,
                                                  no.finn.unleash.Variant variant)
        Specified by:
        getVariant in interface no.finn.unleash.Unleash
      • getFeatureToggleNames

        public List<String> getFeatureToggleNames()
        Specified by:
        getFeatureToggleNames in interface no.finn.unleash.Unleash
      • more

        public no.finn.unleash.MoreOperations more()
        Specified by:
        more in interface no.finn.unleash.Unleash