예제 #1
0
        public void Should_throw_for_null_IConsulKeyValueClient()
        {
            //Given
            IConsulKeyValueClient client = null;

            // When
            var shouldThrow = new Action(() => new ConsulKeyValueConfigurationProvider(client));

            //Then
            Assert.Throws <ArgumentNullException>(shouldThrow);
        }
예제 #2
0
 public ConsulKeyValueConfigurationProvider(IConsulKeyValueClient consulKeyValueClient)
 {
     _consulKeyValueClient = consulKeyValueClient ?? throw new ArgumentNullException(nameof(consulKeyValueClient));
 }