|
|
@ -13,7 +13,7 @@ namespace NzbDrone.Core.Test.Configuration
|
|
|
|
[SetUp]
|
|
|
|
[SetUp]
|
|
|
|
public void SetUp()
|
|
|
|
public void SetUp()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Mocker.Resolve<IConfigRepository, ConfigRepository>();
|
|
|
|
Mocker.SetConstant<IConfigRepository>(Mocker.Resolve<ConfigRepository>());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
@ -65,7 +65,7 @@ namespace NzbDrone.Core.Test.Configuration
|
|
|
|
Subject.SetValue(key, newValue);
|
|
|
|
Subject.SetValue(key, newValue);
|
|
|
|
var result = Subject.GetValue(key, "");
|
|
|
|
var result = Subject.GetValue(key, "");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.Should().Be(newValue);
|
|
|
|
result.Should().Be(newValue);
|
|
|
|
AllStoredModels.Should().HaveCount(1);
|
|
|
|
AllStoredModels.Should().HaveCount(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -141,7 +141,7 @@ namespace NzbDrone.Core.Test.Configuration
|
|
|
|
var allProperties = typeof(ConfigService).GetProperties().Where(p => p.GetSetMethod() != null).ToList();
|
|
|
|
var allProperties = typeof(ConfigService).GetProperties().Where(p => p.GetSetMethod() != null).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var propertyInfo in allProperties)
|
|
|
|
foreach (var propertyInfo in allProperties)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
object value = null;
|
|
|
|
object value = null;
|
|
|
|