mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
fixed unit test file path generation to be linux compatible.
This commit is contained in:
+5
-8
@@ -51,23 +51,20 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests.SabProviderTests
|
||||
s =>
|
||||
s.DownloadString(
|
||||
"http://192.168.5.55:2222/api?mode=queue&output=json&start=0&limit=0&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass"))
|
||||
.Returns(File.ReadAllText(@".\Files\Queue.txt"));
|
||||
.Returns(ReadAllText("Files","Queue.txt"));
|
||||
}
|
||||
|
||||
private void WithEmptyQueue()
|
||||
{
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
.Setup(
|
||||
s =>
|
||||
s.DownloadString(
|
||||
"http://192.168.5.55:2222/api?mode=queue&output=json&start=0&limit=0&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass"))
|
||||
.Returns(File.ReadAllText(@".\Files\QueueEmpty.txt"));
|
||||
.Setup(s => s.DownloadString("http://192.168.5.55:2222/api?mode=queue&output=json&start=0&limit=0&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass"))
|
||||
.Returns(ReadAllText("Files","QueueEmpty.txt"));
|
||||
}
|
||||
|
||||
private void WithFailResponse()
|
||||
{
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
.Setup(s => s.DownloadString(It.IsAny<String>())).Returns(File.ReadAllText(@".\Files\JsonError.txt"));
|
||||
.Setup(s => s.DownloadString(It.IsAny<String>())).Returns(ReadAllText("Files","JsonError.txt"));
|
||||
}
|
||||
|
||||
private void WithUnknownPriorityQueue()
|
||||
@@ -77,7 +74,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests.SabProviderTests
|
||||
s =>
|
||||
s.DownloadString(
|
||||
"http://192.168.5.55:2222/api?mode=queue&output=json&start=0&limit=0&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass"))
|
||||
.Returns(File.ReadAllText(@".\Files\QueueUnknownPriority.txt"));
|
||||
.Returns(ReadAllText("Files", "QueueUnknownPriority.txt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in New Issue
Block a user