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); }
public bool Update(UpdateConfigurationDTO dto) { var validationResult = new UpdateConfigurationValidator().Validate(dto); return(validationResult.IsValid && _storageProvider.Update(dto)); }