public void Update_EmptyRequest_NotUpdated() { var configurationReader = new ConfigurationEngine(_dataRepository, _mockCacheRepository, ApplicationName, 1); var result = configurationReader.Update(new UpdateConfigurationDTO()); Assert.False(result); }
public void Update_EmptyValue_NotUpdated() { var configurationReader = new ConfigurationEngine(_dataRepository, _mockCacheRepository, ApplicationName, 1); var result = configurationReader.Update(new UpdateConfigurationDTO { Id = "1", IsActive = true, Type = "Type", Value = string.Empty }); Assert.False(result); }
public void Update_ValidRequest_Updated() { var configurationReader = new ConfigurationEngine(_dataRepository, _mockCacheRepository, ApplicationName, 1); _dataRepository.Update(Arg.Any <UpdateConfigurationDTO>()).Returns(true); var result = configurationReader.Update(new UpdateConfigurationDTO { Id = "1", IsActive = true, Type = "Type", Value = "Value" }); Assert.True(result); }