mirror of
https://github.com/Sonarr/Sonarr
synced 2026-05-08 13:01:10 +02:00
Bump NUnit to 4.5.1
This commit is contained in:
parent
a42a3d8537
commit
3a615d63c0
18 changed files with 42 additions and 45 deletions
|
|
@ -122,9 +122,9 @@
|
|||
<PackageReference Include="coverlet.collector" Version="6.0.4" />
|
||||
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
||||
<PackageReference Include="NUnit" Version="3.14.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0" />
|
||||
<PackageReference Include="NunitXml.TestLogger" Version="3.1.20" />
|
||||
<PackageReference Include="NUnit" Version="4.5.1" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="6.2.0" />
|
||||
<PackageReference Include="NunitXml.TestLogger" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(SonarrProject)'=='true' and '$(EnableAnalyzers)'=='false'">
|
||||
|
|
|
|||
|
|
@ -981,7 +981,7 @@ private void VerifyCopyFolder(string source, string destination)
|
|||
var sourceFiles = Directory.GetFileSystemEntries(source, "*", SearchOption.AllDirectories).Select(v => v.Substring(source.Length + 1)).ToArray();
|
||||
var destFiles = Directory.GetFileSystemEntries(destination, "*", SearchOption.AllDirectories).Select(v => v.Substring(destination.Length + 1)).ToArray();
|
||||
|
||||
CollectionAssert.AreEquivalent(sourceFiles, destFiles);
|
||||
Assert.That(sourceFiles, Is.EquivalentTo(destFiles));
|
||||
}
|
||||
|
||||
private void VerifyMoveFolder(string source, string from, string destination)
|
||||
|
|
@ -991,7 +991,7 @@ private void VerifyMoveFolder(string source, string from, string destination)
|
|||
var sourceFiles = Directory.GetFileSystemEntries(source, "*", SearchOption.AllDirectories).Select(v => v.Substring(source.Length + 1)).ToArray();
|
||||
var destFiles = Directory.GetFileSystemEntries(destination, "*", SearchOption.AllDirectories).Select(v => v.Substring(destination.Length + 1)).ToArray();
|
||||
|
||||
CollectionAssert.AreEquivalent(sourceFiles, destFiles);
|
||||
Assert.That(sourceFiles, Is.EquivalentTo(destFiles));
|
||||
}
|
||||
|
||||
private void VerifyDeletedFile(string filePath)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NLog;
|
||||
|
|
@ -39,7 +38,7 @@ public void SetupBase()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(s => s.GetAsync(It.IsAny<HttpRequest>()))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), Array.Empty<byte>())));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), Array.Empty<byte>()));
|
||||
|
||||
Mocker.GetMock<IRemotePathMappingService>()
|
||||
.Setup(v => v.RemapRemoteToLocal(It.IsAny<string>(), It.IsAny<OsPath>()))
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ protected void GivenSuccessfulDownload()
|
|||
{
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(s => s.GetAsync(It.IsAny<HttpRequest>()))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), new byte[1000])));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), new byte[1000]));
|
||||
|
||||
Mocker.GetMock<IHadoukenProxy>()
|
||||
.Setup(s => s.AddTorrentUri(It.IsAny<HadoukenSettings>(), It.IsAny<string>()))
|
||||
|
|
|
|||
|
|
@ -111,31 +111,31 @@ private List<SearchCriteriaBase> WatchForSearchCriteria()
|
|||
|
||||
_mockIndexer.Setup(v => v.Fetch(It.IsAny<SingleEpisodeSearchCriteria>()))
|
||||
.Callback<SingleEpisodeSearchCriteria>(s => result.Add(s))
|
||||
.Returns(Task.FromResult<IList<Parser.Model.ReleaseInfo>>(new List<Parser.Model.ReleaseInfo>()));
|
||||
.ReturnsAsync(new List<Parser.Model.ReleaseInfo>());
|
||||
|
||||
_mockIndexer.Setup(v => v.Fetch(It.IsAny<SeasonSearchCriteria>()))
|
||||
.Callback<SeasonSearchCriteria>(s => result.Add(s))
|
||||
.Returns(Task.FromResult<IList<Parser.Model.ReleaseInfo>>(new List<Parser.Model.ReleaseInfo>()));
|
||||
.ReturnsAsync(new List<Parser.Model.ReleaseInfo>());
|
||||
|
||||
_mockIndexer.Setup(v => v.Fetch(It.IsAny<DailyEpisodeSearchCriteria>()))
|
||||
.Callback<DailyEpisodeSearchCriteria>(s => result.Add(s))
|
||||
.Returns(Task.FromResult<IList<Parser.Model.ReleaseInfo>>(new List<Parser.Model.ReleaseInfo>()));
|
||||
.ReturnsAsync(new List<Parser.Model.ReleaseInfo>());
|
||||
|
||||
_mockIndexer.Setup(v => v.Fetch(It.IsAny<DailySeasonSearchCriteria>()))
|
||||
.Callback<DailySeasonSearchCriteria>(s => result.Add(s))
|
||||
.Returns(Task.FromResult<IList<Parser.Model.ReleaseInfo>>(new List<Parser.Model.ReleaseInfo>()));
|
||||
.ReturnsAsync(new List<Parser.Model.ReleaseInfo>());
|
||||
|
||||
_mockIndexer.Setup(v => v.Fetch(It.IsAny<AnimeEpisodeSearchCriteria>()))
|
||||
.Callback<AnimeEpisodeSearchCriteria>(s => result.Add(s))
|
||||
.Returns(Task.FromResult<IList<Parser.Model.ReleaseInfo>>(new List<Parser.Model.ReleaseInfo>()));
|
||||
.ReturnsAsync(new List<Parser.Model.ReleaseInfo>());
|
||||
|
||||
_mockIndexer.Setup(v => v.Fetch(It.IsAny<AnimeSeasonSearchCriteria>()))
|
||||
.Callback<AnimeSeasonSearchCriteria>(s => result.Add(s))
|
||||
.Returns(Task.FromResult<IList<Parser.Model.ReleaseInfo>>(new List<Parser.Model.ReleaseInfo>()));
|
||||
.ReturnsAsync(new List<Parser.Model.ReleaseInfo>());
|
||||
|
||||
_mockIndexer.Setup(v => v.Fetch(It.IsAny<SpecialEpisodeSearchCriteria>()))
|
||||
.Callback<SpecialEpisodeSearchCriteria>(s => result.Add(s))
|
||||
.Returns(Task.FromResult<IList<Parser.Model.ReleaseInfo>>(new List<Parser.Model.ReleaseInfo>()));
|
||||
.ReturnsAsync(new List<Parser.Model.ReleaseInfo>());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using FizzWare.NBuilder;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
|
|
@ -38,11 +37,11 @@ public void Setup()
|
|||
|
||||
Mocker.GetMock<ISearchForReleases>()
|
||||
.Setup(s => s.SeasonSearch(_series.Id, It.IsAny<int>(), false, false, true, false))
|
||||
.Returns(Task.FromResult(new List<DownloadDecision>()));
|
||||
.ReturnsAsync(new List<DownloadDecision>());
|
||||
|
||||
Mocker.GetMock<IProcessDownloadDecisions>()
|
||||
.Setup(s => s.ProcessDecisions(It.IsAny<List<DownloadDecision>>()))
|
||||
.Returns(Task.FromResult(new ProcessedDecisions(new List<DownloadDecision>(), new List<DownloadDecision>(), new List<DownloadDecision>())));
|
||||
.ReturnsAsync(new ProcessedDecisions(new List<DownloadDecision>(), new List<DownloadDecision>(), new List<DownloadDecision>()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
@ -91,7 +90,7 @@ public void should_start_with_lower_seasons_first()
|
|||
|
||||
Mocker.GetMock<ISearchForReleases>()
|
||||
.Setup(s => s.SeasonSearch(_series.Id, It.IsAny<int>(), false, true, true, false))
|
||||
.Returns(Task.FromResult(new List<DownloadDecision>()))
|
||||
.ReturnsAsync(new List<DownloadDecision>())
|
||||
.Callback<int, int, bool, bool, bool, bool>((seriesId, seasonNumber, missingOnly, monitoredOnly, userInvokedSearch, interactiveSearch) => seasonOrder.Add(seasonNumber));
|
||||
|
||||
Subject.Execute(new SeriesSearchCommand { SeriesId = _series.Id, Trigger = CommandTrigger.Manual });
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public async Task should_parse_recent_feed_from_BroadcastheNet()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Post)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ public async Task should_back_off_on_bad_request()
|
|||
{
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(v => v.ExecuteAsync(It.IsAny<HttpRequest>()))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), Array.Empty<byte>(), System.Net.HttpStatusCode.BadRequest)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), Array.Empty<byte>(), System.Net.HttpStatusCode.BadRequest));
|
||||
|
||||
var results = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ public async Task should_back_off_and_report_api_key_invalid()
|
|||
{
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(v => v.ExecuteAsync(It.IsAny<HttpRequest>()))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), Array.Empty<byte>(), System.Net.HttpStatusCode.Unauthorized)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), Array.Empty<byte>(), System.Net.HttpStatusCode.Unauthorized));
|
||||
|
||||
var results = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ public async Task should_back_off_on_unknown_method()
|
|||
{
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(v => v.ExecuteAsync(It.IsAny<HttpRequest>()))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), Array.Empty<byte>(), System.Net.HttpStatusCode.NotFound)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), Array.Empty<byte>(), System.Net.HttpStatusCode.NotFound));
|
||||
|
||||
var results = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ public async Task should_back_off_api_limit_reached()
|
|||
{
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(v => v.ExecuteAsync(It.IsAny<HttpRequest>()))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), Array.Empty<byte>(), System.Net.HttpStatusCode.ServiceUnavailable)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), Array.Empty<byte>(), System.Net.HttpStatusCode.ServiceUnavailable));
|
||||
|
||||
var results = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ public async Task should_replace_https_http_as_needed()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Post)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public async Task should_parse_recent_feed_from_fanzub()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public async Task should_parse_recent_feed_from_FileList()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader { { "Content-Type", "application/json" } }, recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader { { "Content-Type", "application/json" } }, recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public async Task should_parse_recent_feed_from_HDBits(string fileName)
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Post)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), responseJson)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), responseJson));
|
||||
|
||||
var torrents = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ public async Task should_warn_on_wrong_passkey()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(v => v.ExecuteAsync(It.IsAny<HttpRequest>()))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), Encoding.UTF8.GetBytes(responseJson))));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), Encoding.UTF8.GetBytes(responseJson)));
|
||||
|
||||
var torrents = await Subject.FetchRecent();
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public async Task should_parse_recent_feed_from_IPTorrents()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public async Task should_parse_recent_feed_from_newznab_nzb_su()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ public async Task should_parse_recent_feed_from_newznab_animetosho()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ public async Task should_parse_languages()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ public async Task should_parse_indexer_flags(string releaseGuid, params IndexerF
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), feed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), feed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public async Task should_parse_2021_recent_feed_from_Nyaa()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using FizzWare.NBuilder;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
|
|
@ -25,7 +24,7 @@ public void Setup()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), "<xml></xml>")));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), "<xml></xml>"));
|
||||
}
|
||||
|
||||
private void WithIndexer(bool paging, int resultCount)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ private void GivenRecentFeedResponse(string rssXmlFile)
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.IsAny<HttpRequest>()))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.Execute(It.IsAny<HttpRequest>()))
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public async Task should_parse_recent_feed_from_Torrentleech()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public async Task should_parse_recent_feed_from_torznab_hdaccess_net()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ public async Task should_parse_recent_feed_from_torznab_tpb()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ public async Task should_parse_recent_feed_from_torznab_animetosho()
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var releases = await Subject.FetchRecent();
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ public void jackett_all_url_should_not_validate(string baseUrl)
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
var result = new NzbDroneValidationResult(Subject.Test());
|
||||
result.IsValid.Should().BeTrue();
|
||||
|
|
@ -190,7 +190,7 @@ public void jackett_all_api_should_not_validate(string apiPath)
|
|||
|
||||
Mocker.GetMock<IHttpClient>()
|
||||
.Setup(o => o.ExecuteAsync(It.Is<HttpRequest>(v => v.Method == HttpMethod.Get)))
|
||||
.Returns<HttpRequest>(r => Task.FromResult(new HttpResponse(r, new HttpHeader(), recentFeed)));
|
||||
.ReturnsAsync((HttpRequest r) => new HttpResponse(r, new HttpHeader(), recentFeed));
|
||||
|
||||
(Subject.Definition.Settings as TorznabSettings).ApiPath = apiPath;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<PackageReference Include="FluentValidation" Version="9.5.4" />
|
||||
<PackageReference Include="Moq" Version="4.18.4" />
|
||||
<PackageReference Include="NLog" Version="5.5.1" />
|
||||
<PackageReference Include="NUnit" Version="3.14.0" />
|
||||
<PackageReference Include="NUnit" Version="4.5.1" />
|
||||
<PackageReference Include="RestSharp" Version="106.15.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Reference in a new issue