public void FeatureValueProvider_returns_expected()
        {
            var dummyValueProvider = new FeatureToggleValueProviderBuilder().Build();
            var sut = new FeatureToggleService(dummyValueProvider);

            Assert.AreSame(dummyValueProvider, sut.FeatureToggleValueProvider);
        }
Example #2
0
        public void full_test()
        {
            var valueProviderStub = new FeatureToggleValueProviderBuilder()
                .WithFeatureToggle("f1", true)
                .WithFeatureToggle("f2", false)
                .Build();

            var cfg = new ConfigurationBuilder()
                .WithValueProvider(valueProviderStub)
                .Build();

            TogglrEngine.ApplyConfiguration(cfg);

            Assert.IsTrue(TogglrEngine.IsFeatureEnabled("f1"));
            Assert.IsFalse(TogglrEngine.IsFeatureEnabled("f2"));
        }