Use modern HttpClient

(cherry picked from commit 402f8b296f17bf161824ec5ff40d67d036d00d94)
This commit is contained in:
ta264
2021-11-10 21:59:08 +00:00
parent 5f946c0aa3
commit cef15887a4
39 changed files with 372 additions and 318 deletions
@@ -1,6 +1,7 @@
using System;
using System.Linq;
using System.Net;
using System.Net.Http;
using FluentAssertions;
using Moq;
using NUnit.Framework;
@@ -43,7 +44,7 @@ namespace NzbDrone.Core.Test.IndexerTests.NewznabTests
var recentFeed = ReadAllText(@"Files/Indexers/Newznab/newznab_nzb_su.xml");
Mocker.GetMock<IHttpClient>()
.Setup(o => o.Execute(It.Is<HttpRequest>(v => v.Method == HttpMethod.GET)))
.Setup(o => o.Execute(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), recentFeed));
var releases = Subject.FetchRecent();