mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
extracted interface fom HttpProvider
This commit is contained in:
parent
35e2e83595
commit
1465fbf499
28 changed files with 124 additions and 121 deletions
|
@ -26,7 +26,7 @@ namespace NzbDrone.Core.Test.DataAugmentationFixture.Scene
|
|||
[Test]
|
||||
public void fetch_should_return_list_of_mappings()
|
||||
{
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
Mocker.GetMock<IHttpProvider>()
|
||||
.Setup(s => s.DownloadString(SCENE_MAPPING_URL))
|
||||
.Returns(ReadAllText("Files", "SceneMappings.json"));
|
||||
|
||||
|
@ -43,7 +43,7 @@ namespace NzbDrone.Core.Test.DataAugmentationFixture.Scene
|
|||
[Test]
|
||||
public void should_throw_on_server_error()
|
||||
{
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
Mocker.GetMock<IHttpProvider>()
|
||||
.Setup(s => s.DownloadString(SCENE_MAPPING_URL))
|
||||
.Throws(new WebException());
|
||||
Assert.Throws<WebException>(() => Subject.Fetch());
|
||||
|
@ -52,7 +52,7 @@ namespace NzbDrone.Core.Test.DataAugmentationFixture.Scene
|
|||
[Test]
|
||||
public void should_throw_on_bad_json()
|
||||
{
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
Mocker.GetMock<IHttpProvider>()
|
||||
.Setup(s => s.DownloadString(SCENE_MAPPING_URL))
|
||||
.Returns("bad json");
|
||||
Assert.Throws<JsonReaderException>(() => Subject.Fetch());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue