예제 #1
0
        public void GetAllFeatures_GivenFeatureEnabledConfigButOverriddenByTheUser_ReturnsDisabledFeature()
        {
            SetupOverrides(new Dictionary <string, bool> {
                { "featureenabledTest", false }
            });

            var enabled = FeatureToggles.IsEnabled("featureenabledTest");

            Assert.False(enabled);
        }
        protected override void CreateChildControls()
        {
            if (FeatureToggles.IsEnabled(FeatureName))
            {
                EnabledTemplate.InstantiateIn(this);
            }
            else
            {
                DisabledTemplate.InstantiateIn(this);
            }

            base.CreateChildControls();
        }
예제 #3
0
 public void ReadsBasicFeaturesFromConfigCorrectly(string feature, bool expected)
 {
     Assert.AreEqual(expected, FeatureToggles.IsEnabled(feature));
 }