コード例 #1
0
        public void Update_EmptyRequest_NotUpdated()
        {
            var configurationReader = new ConfigurationEngine(_dataRepository, _mockCacheRepository, ApplicationName, 1);

            var result = configurationReader.Update(new UpdateConfigurationDTO());

            Assert.False(result);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }