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(); }
public void ReadsBasicFeaturesFromConfigCorrectly(string feature, bool expected) { Assert.AreEqual(expected, FeatureToggles.IsEnabled(feature)); }