public void Should_throw_for_null_IConsulKeyValueClient() { //Given IConsulKeyValueClient client = null; // When var shouldThrow = new Action(() => new ConsulKeyValueConfigurationProvider(client)); //Then Assert.Throws <ArgumentNullException>(shouldThrow); }
public ConsulKeyValueConfigurationProvider(IConsulKeyValueClient consulKeyValueClient) { _consulKeyValueClient = consulKeyValueClient ?? throw new ArgumentNullException(nameof(consulKeyValueClient)); }