1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-28 23:16:32 -04:00

Use modern HttpClient

Co-Authored-By: ta264 <ta264@users.noreply.github.com>
This commit is contained in:
Qstick
2021-11-13 15:10:42 -06:00
committed by Mark McDowall
parent bff1fe7890
commit 4c0fe62dda
69 changed files with 1271 additions and 1060 deletions
@@ -1,5 +1,6 @@
using System;
using System;
using System.Linq;
using System.Net.Http;
using FluentAssertions;
using Moq;
using NUnit.Framework;
@@ -31,7 +32,7 @@ namespace NzbDrone.Core.Test.IndexerTests.BroadcastheNetTests
var recentFeed = ReadAllText(@"Files/Indexers/BroadcastheNet/RecentFeed.json");
Mocker.GetMock<IHttpClient>()
.Setup(o => o.Execute(It.Is<HttpRequest>(v => v.Method == HttpMethod.POST)))
.Setup(o => o.Execute(It.Is<HttpRequest>(v => v.Method == HttpMethod.Post)))
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), recentFeed));
var releases = Subject.FetchRecent();
@@ -144,7 +145,7 @@ namespace NzbDrone.Core.Test.IndexerTests.BroadcastheNetTests
recentFeed = recentFeed.Replace("http:", "https:");
Mocker.GetMock<IHttpClient>()
.Setup(o => o.Execute(It.Is<HttpRequest>(v => v.Method == HttpMethod.POST)))
.Setup(o => o.Execute(It.Is<HttpRequest>(v => v.Method == HttpMethod.Post)))
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), recentFeed));
var releases = Subject.FetchRecent();