|
|
|
@ -38,7 +38,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IHttpClient>()
|
|
|
|
|
.Setup(s => s.Get(It.IsAny<HttpRequest>()))
|
|
|
|
|
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), new byte[0]));
|
|
|
|
|
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), Array.Empty<byte>()));
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IQBittorrentProxy>()
|
|
|
|
|
.Setup(s => s.GetConfig(It.IsAny<QBittorrentSettings>()))
|
|
|
|
@ -56,7 +56,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IHttpClient>()
|
|
|
|
|
.Setup(s => s.Get(It.IsAny<HttpRequest>()))
|
|
|
|
|
.Returns<HttpRequest>(r => new HttpResponse(r, httpHeader, new byte[0], System.Net.HttpStatusCode.SeeOther));
|
|
|
|
|
.Returns<HttpRequest>(r => new HttpResponse(r, httpHeader, Array.Empty<byte>(), System.Net.HttpStatusCode.SeeOther));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void GivenRedirectToTorrent()
|
|
|
|
@ -66,7 +66,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IHttpClient>()
|
|
|
|
|
.Setup(s => s.Get(It.Is<HttpRequest>(h => h.Url.FullUri == _downloadUrl)))
|
|
|
|
|
.Returns<HttpRequest>(r => new HttpResponse(r, httpHeader, new byte[0], System.Net.HttpStatusCode.Found));
|
|
|
|
|
.Returns<HttpRequest>(r => new HttpResponse(r, httpHeader, Array.Empty<byte>(), System.Net.HttpStatusCode.Found));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void GivenFailedDownload()
|
|
|
|
@ -523,7 +523,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.QBittorrentTests
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IQBittorrentProxy>()
|
|
|
|
|
.Setup(v => v.MoveTorrentToTopInQueue(It.IsAny<string>(), It.IsAny<QBittorrentSettings>()))
|
|
|
|
|
.Throws(new HttpException(new HttpResponse(new HttpRequest("http://me.local/"), new HttpHeader(), new byte[0], System.Net.HttpStatusCode.Forbidden)));
|
|
|
|
|
.Throws(new HttpException(new HttpResponse(new HttpRequest("http://me.local/"), new HttpHeader(), Array.Empty<byte>(), System.Net.HttpStatusCode.Forbidden)));
|
|
|
|
|
|
|
|
|
|
var remoteEpisode = CreateRemoteEpisode();
|
|
|
|
|
|
|
|
|
|