1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-20 21:55:03 -04:00

New: Async HttpClient

(cherry picked from commit e12111cee885e23a42308f299ef773e5ae021712)
This commit is contained in:
Bogdan
2023-07-16 21:07:31 +03:00
parent d61ce6112b
commit efe5c3beb7
56 changed files with 653 additions and 527 deletions
@@ -1,4 +1,5 @@
using System;
using System.Threading.Tasks;
using FluentAssertions;
using Moq;
using NLog;
@@ -36,8 +37,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
.Returns(() => CreateRemoteMovie());
Mocker.GetMock<IHttpClient>()
.Setup(s => s.Get(It.IsAny<HttpRequest>()))
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), Array.Empty<byte>()));
.Setup(s => s.GetAsync(It.IsAny<HttpRequest>()))
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), Array.Empty<byte>())));
Mocker.GetMock<IRemotePathMappingService>()
.Setup(v => v.RemapRemoteToLocal(It.IsAny<string>(), It.IsAny<OsPath>()))