mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Updated Test harnass, NUnit to 3.12.0, NBuilder to 6.0.0, Moq to 4.12.0, FluentAssertions to 5.8.0
This commit is contained in:
parent
2b7893c834
commit
be240119e8
@ -4,7 +4,7 @@
|
||||
<Platforms>x86</Platforms>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NBuilder" Version="4.0.0" />
|
||||
<PackageReference Include="NBuilder" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NzbDrone.Core\Sonarr.Core.csproj" />
|
||||
|
@ -35,7 +35,7 @@ public void should_throw_when_invalid_encoding_is_in_content_type_header(string
|
||||
var httpheader = new HttpHeader(headers);
|
||||
|
||||
Action action = () => httpheader.GetEncodingFromContentType();
|
||||
action.ShouldThrow<ArgumentException>();
|
||||
action.Should().Throw<ArgumentException>();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -64,7 +64,7 @@ public void should_be_able_to_find_by_id()
|
||||
Subject.Insert(_basicType);
|
||||
var storeObject = Subject.Get(_basicType.Id);
|
||||
|
||||
storeObject.ShouldBeEquivalentTo(_basicType, o=>o.IncludingAllRuntimeProperties());
|
||||
storeObject.Should().BeEquivalentTo(_basicType, o=>o.IncludingAllRuntimeProperties());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -32,7 +32,7 @@ public void one_to_one()
|
||||
var loadedEpisodeFile = Db.Single<Episode>().EpisodeFile.Value;
|
||||
|
||||
loadedEpisodeFile.Should().NotBeNull();
|
||||
loadedEpisodeFile.ShouldBeEquivalentTo(episodeFile,
|
||||
loadedEpisodeFile.Should().BeEquivalentTo(episodeFile,
|
||||
options => options
|
||||
.IncludingAllRuntimeProperties()
|
||||
.Excluding(c => c.DateAdded)
|
||||
|
@ -29,7 +29,7 @@ public void should_add_remux_to_old_profile()
|
||||
items.Should().HaveCount(4);
|
||||
items.Select(v => v.Quality).Should().BeEquivalentTo(7, 20, 19, 21);
|
||||
items.Select(v => v.Allowed).Should().BeEquivalentTo(true, false, true, false);
|
||||
items.Select(v => v.Name).Should().BeEquivalentTo(null, null, null, null);
|
||||
items.Select(v => v.Name).Should().BeEquivalentTo(null, null, null, (string)null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -39,7 +39,7 @@ private void WithIndexer(bool paging, int resultCount)
|
||||
|
||||
var requests = Builder<IndexerRequest>.CreateListOfSize(paging ? 100 : 1)
|
||||
.All()
|
||||
.WithConstructor(() => new IndexerRequest("http://my.feed.local/", HttpAccept.Rss))
|
||||
.WithFactory(() => new IndexerRequest("http://my.feed.local/", HttpAccept.Rss))
|
||||
.With(v => v.HttpRequest.Method = HttpMethod.GET)
|
||||
.Build();
|
||||
|
||||
|
@ -118,7 +118,7 @@ public void should_cache_settings_for_same_baseurl()
|
||||
|
||||
var detection2 = Subject.GetParser(_indexerSettings1);
|
||||
|
||||
detection1.ShouldBeEquivalentTo(detection2);
|
||||
detection1.Should().BeEquivalentTo(detection2);
|
||||
|
||||
VerifyDetectionCount(1);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public void should_detect_rss_settings_for_ezrss()
|
||||
|
||||
var settings = Subject.Detect(_indexerSettings);
|
||||
|
||||
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
settings.Should().BeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
{
|
||||
UseEZTVFormat = true,
|
||||
UseEnclosureUrl = false,
|
||||
@ -55,7 +55,7 @@ public void should_detect_rss_settings_for_speed_cd()
|
||||
|
||||
var settings = Subject.Detect(_indexerSettings);
|
||||
|
||||
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
settings.Should().BeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
{
|
||||
UseEZTVFormat = false,
|
||||
UseEnclosureUrl = false,
|
||||
@ -73,7 +73,7 @@ public void should_detect_rss_settings_for_ImmortalSeed()
|
||||
|
||||
var settings = Subject.Detect(_indexerSettings);
|
||||
|
||||
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
settings.Should().BeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
{
|
||||
UseEZTVFormat = false,
|
||||
UseEnclosureUrl = false,
|
||||
@ -93,7 +93,7 @@ public void should_detect_rss_settings_for_ShowRSS_info()
|
||||
|
||||
var settings = Subject.Detect(_indexerSettings);
|
||||
|
||||
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
settings.Should().BeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
{
|
||||
UseEZTVFormat = false,
|
||||
UseEnclosureUrl = true,
|
||||
@ -111,7 +111,7 @@ public void should_detect_rss_settings_for_TransmitTheNet()
|
||||
|
||||
var settings = Subject.Detect(_indexerSettings);
|
||||
|
||||
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
settings.Should().BeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
{
|
||||
UseEZTVFormat = false,
|
||||
UseEnclosureUrl = true,
|
||||
@ -129,7 +129,7 @@ public void should_detect_rss_settings_for_BitHdtv()
|
||||
|
||||
var settings = Subject.Detect(_indexerSettings);
|
||||
|
||||
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
settings.Should().BeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
{
|
||||
UseEZTVFormat = false,
|
||||
UseEnclosureUrl = false,
|
||||
@ -149,7 +149,7 @@ public void should_detect_rss_settings_for_Doki()
|
||||
|
||||
var settings = Subject.Detect(_indexerSettings);
|
||||
|
||||
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
settings.Should().BeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
{
|
||||
UseEZTVFormat = false,
|
||||
UseEnclosureUrl = true,
|
||||
@ -169,7 +169,7 @@ public void should_detect_rss_settings_for_ExtraTorrents()
|
||||
|
||||
var settings = Subject.Detect(_indexerSettings);
|
||||
|
||||
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
settings.Should().BeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
{
|
||||
UseEZTVFormat = false,
|
||||
UseEnclosureUrl = true,
|
||||
@ -189,7 +189,7 @@ public void should_detect_rss_settings_for_LimeTorrents()
|
||||
|
||||
var settings = Subject.Detect(_indexerSettings);
|
||||
|
||||
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
settings.Should().BeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
{
|
||||
UseEZTVFormat = false,
|
||||
UseEnclosureUrl = true,
|
||||
@ -209,7 +209,7 @@ public void should_detect_rss_settings_for_AlphaRatio()
|
||||
|
||||
var settings = Subject.Detect(_indexerSettings);
|
||||
|
||||
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
settings.Should().BeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
{
|
||||
UseEZTVFormat = false,
|
||||
UseEnclosureUrl = false,
|
||||
@ -242,7 +242,7 @@ public void should_detect_rss_settings_for_AnimeTosho_without_size()
|
||||
|
||||
var settings = Subject.Detect(_indexerSettings);
|
||||
|
||||
settings.ShouldBeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
settings.Should().BeEquivalentTo(new TorrentRssIndexerParserSettings
|
||||
{
|
||||
UseEZTVFormat = false,
|
||||
UseEnclosureUrl = true,
|
||||
|
@ -4,7 +4,7 @@
|
||||
<Platforms>x86</Platforms>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NBuilder" Version="4.0.0" />
|
||||
<PackageReference Include="NBuilder" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\NzbDrone.Test.Common\Sonarr.Test.Common.csproj" />
|
||||
|
@ -23,7 +23,7 @@ public void should_read_write_download_provider()
|
||||
|
||||
var storedSetting = (NewznabSettings)storedProvider.Settings;
|
||||
|
||||
storedSetting.ShouldBeEquivalentTo(newznabSettings, o=>o.IncludingAllRuntimeProperties());
|
||||
storedSetting.Should().BeEquivalentTo(newznabSettings, o=>o.IncludingAllRuntimeProperties());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ public void should_be_able_to_deserialize_numbers()
|
||||
var quality = new TypeWithNumbers { Int32 = int.MaxValue, Int64 = long.MaxValue, nullableWithValue = 12 };
|
||||
var result = Json.Deserialize<TypeWithNumbers>(quality.ToJson());
|
||||
|
||||
result.ShouldBeEquivalentTo(quality, o => o.IncludingAllRuntimeProperties());
|
||||
result.Should().BeEquivalentTo(quality, o => o.IncludingAllRuntimeProperties());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -4,12 +4,11 @@
|
||||
<Platforms>x86</Platforms>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommonServiceLocator" Version="1.3" />
|
||||
<PackageReference Include="FluentAssertions" Version="4.19.0" />
|
||||
<PackageReference Include="FluentAssertions" Version="5.8.0" />
|
||||
<PackageReference Include="FluentValidation" Version="8.4.0" />
|
||||
<PackageReference Include="Moq" Version="4.0.10827" />
|
||||
<PackageReference Include="Moq" Version="4.12.0" />
|
||||
<PackageReference Include="NLog" Version="4.6.6" />
|
||||
<PackageReference Include="NUnit" Version="3.6.0" />
|
||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||
<PackageReference Include="RestSharp" Version="106.6.10" />
|
||||
<PackageReference Include="Unity" Version="2.1.505.2" />
|
||||
</ItemGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user