public void provider_should_return_checked_result() { GivenAnEnabledFeature(); GivenAProviderWithAChecker(); checker.IsAvailable(Arg.Any <Feature>()).Returns(true); provider.ReadConfiguration(); provider.IsAvailable("feature1").ShouldBe(true); }
public bool IsAvailable(Feature feature) { var result = feature.State; if (checkerImpl != null) { result = result && checkerImpl.IsAvailable(feature); } return(result); }