public void RunActionWhenDisabledShouldPassThroughToFeatureToggle()
        {
            _featureToggle.RemovedBy = "fake";
            _mockFeatureToggleFactory.Setup(fact => fact.GetFeatureToggle("fake", true)).Returns(
                _mockFeatureToggle.Object);
            Action action = () => { };

            _featureToggle.ApplyToggle();
            _featureToggle.RunActionWhenDisabled(action);
            _mockFeatureToggle.Verify(status => status.RunActionIfOff(action));
        }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     WebFeatureToggle.RunActionWhenDisabled(CodeToRunIfDisabled);
     WebFeatureToggle.RunActionWhenEnabled(CodeToRunIfEnabled);
 }