Exemple #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);
        }
Exemple #2
0
 public ConsulKeyValueConfigurationProvider(IConsulKeyValueClient consulKeyValueClient)
 {
     _consulKeyValueClient = consulKeyValueClient ?? throw new ArgumentNullException(nameof(consulKeyValueClient));
 }