public void provider_should_call_checker() { GivenAnEnabledFeature(); GivenAProviderWithAChecker(); provider.ReadConfiguration(); provider.IsAvailable("feature1"); checker.Received(1).IsAvailable(Arg.Any <Feature>()); }
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); }