示例#1
0
        public void ShouldDeleteValue()
        {
            // Given
            const int id = 1;

            // When
            _defaultClient.Set(
                new ValuesModificationRequest {
                Values = new[] { new ConfigurationValue {
                                     Id = id, Value = "test"
                                 } }
            }
                );
            _defaultClient.Delete(id);

            // Then
            Assert.Throws <ApiException>(() => _defaultClient.Get(id));
            Fixture.MockLogger
            .VerifyErrorWasLogged(typeof(KeyNotFoundException))
            .VerifyNoWarningsWasLogged();
        }
 public ApiClient DeleteValue(int id)
 {
     _valuesServiceClient.Delete(id);
     return(this);
 }