예제 #1
0
        public void Should_be_able_to_add_checkers_onto_features()
        {
            var checker           = new StateChecker();
            var featureDictionary = new Dictionary <string, bool>();

            featureDictionary.Add("feature", true);

            var provider = new InMemorySwitchProvider(featureDictionary);

            provider.AddChecker(checker);

            provider.ReadConfiguration();
            provider.IsAvailable("feature").ShouldBe(true);
        }
예제 #2
0
 private static void GivenAProviderWithAChecker()
 {
     provider = new InMemorySwitchProvider(features);
     checker  = Substitute.For <IChecker>();
     provider.AddChecker(checker);
 }