mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-02-13 11:27:23 +00:00
@@ -62,10 +62,8 @@ namespace NzbDrone.Common.Test
|
||||
const string key = "Port";
|
||||
const int value = 8686;
|
||||
|
||||
|
||||
var result = Subject.GetValueInt(key, value);
|
||||
|
||||
|
||||
result.Should().Be(value);
|
||||
}
|
||||
|
||||
@@ -75,20 +73,16 @@ namespace NzbDrone.Common.Test
|
||||
const string key = "LaunchBrowser";
|
||||
const bool value = true;
|
||||
|
||||
|
||||
var result = Subject.GetValueBoolean(key, value);
|
||||
|
||||
|
||||
result.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetLaunchBrowser_Success()
|
||||
{
|
||||
|
||||
var result = Subject.LaunchBrowser;
|
||||
|
||||
|
||||
result.Should().Be(true);
|
||||
}
|
||||
|
||||
@@ -97,10 +91,8 @@ namespace NzbDrone.Common.Test
|
||||
{
|
||||
const int value = 8686;
|
||||
|
||||
|
||||
var result = Subject.Port;
|
||||
|
||||
|
||||
result.Should().Be(value);
|
||||
}
|
||||
|
||||
@@ -110,10 +102,8 @@ namespace NzbDrone.Common.Test
|
||||
const string key = "LaunchBrowser";
|
||||
const bool value = false;
|
||||
|
||||
|
||||
Subject.SetValue(key, value);
|
||||
|
||||
|
||||
var result = Subject.LaunchBrowser;
|
||||
result.Should().Be(value);
|
||||
}
|
||||
@@ -124,10 +114,8 @@ namespace NzbDrone.Common.Test
|
||||
const string key = "Port";
|
||||
const int value = 12345;
|
||||
|
||||
|
||||
Subject.SetValue(key, value);
|
||||
|
||||
|
||||
var result = Subject.Port;
|
||||
result.Should().Be(value);
|
||||
}
|
||||
@@ -138,10 +126,8 @@ namespace NzbDrone.Common.Test
|
||||
const string key = "Hello";
|
||||
const string value = "World";
|
||||
|
||||
|
||||
var result = Subject.GetValue(key, value);
|
||||
|
||||
|
||||
result.Should().Be(value);
|
||||
}
|
||||
|
||||
@@ -178,7 +164,6 @@ namespace NzbDrone.Common.Test
|
||||
dic["SslPort"] = origSslPort;
|
||||
Subject.SaveConfigDictionary(dic);
|
||||
|
||||
|
||||
dic = new Dictionary<string, object>();
|
||||
dic["SslPort"] = sslPort;
|
||||
Subject.SaveConfigDictionary(dic);
|
||||
@@ -213,4 +198,4 @@ namespace NzbDrone.Common.Test
|
||||
Assert.Throws<InvalidConfigFileException>(() => Subject.GetValue("key", "value"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user