Example #1
0
        public void provider_should_return_checked_result()
        {
            GivenAnEnabledFeature();
            GivenAProviderWithAChecker();
            checker.IsAvailable(Arg.Any <Feature>()).Returns(true);

            provider.ReadConfiguration();
            provider.IsAvailable("feature1").ShouldBe(true);
        }
Example #2
0
        public bool IsAvailable(Feature feature)
        {
            var result = feature.State;

            if (checkerImpl != null)
            {
                result = result && checkerImpl.IsAvailable(feature);
            }

            return(result);
        }