public void FeatureHasDefaultValue() { using (ContextSwitcher.For(_featureContext)) { Assert.True(Feature.IsEnabled(_testFeature)); } }
public void ReturnsIsEnabledFromContext(IFeature feature, IFeatureContext context, bool expected) { A.CallTo(() => context.IsEnabled(feature)) .Returns(expected); bool result; using (ContextSwitcher.For(context)) { result = Feature.IsDisabled(feature); } Assert.Equal(!expected, result); A.CallTo(() => context.IsEnabled(feature)) .MustHaveHappened(); }