Exemple #1
0
 public void FeatureHasDefaultValue()
 {
     using (ContextSwitcher.For(_featureContext))
     {
         Assert.True(Feature.IsEnabled(_testFeature));
     }
 }
Exemple #2
0
            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();
            }