1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-30 07:22:35 +01:00

Split wanted/missing and wanted/cutoffunmet imtegration tests

This commit is contained in:
Mark McDowall 2017-09-02 14:11:23 -07:00
parent 5372ed5d40
commit 9c1d275403
No known key found for this signature in database
GPG Key ID: D4CEFA9A718052E0
3 changed files with 65 additions and 54 deletions

View File

@ -3,42 +3,11 @@ using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Qualities;
namespace NzbDrone.Integration.Test.ApiTests
namespace NzbDrone.Integration.Test.ApiTests.WantedTests
{
[TestFixture]
public class WantedFixture : IntegrationTest
public class CutoffUnmetFixture : IntegrationTest
{
[Test, Order(0)]
public void missing_should_be_empty()
{
EnsureNoSeries(266189, "The Blacklist");
var result = WantedMissing.GetPaged(0, 15, "airDateUtc", "desc");
result.Records.Should().BeEmpty();
}
[Test, Order(1)]
public void missing_should_have_monitored_items()
{
EnsureSeries(266189, "The Blacklist", true);
var result = WantedMissing.GetPaged(0, 15, "airDateUtc", "desc");
result.Records.Should().NotBeEmpty();
}
[Test, Order(1)]
public void missing_should_have_series()
{
EnsureSeries(266189, "The Blacklist", true);
var result = WantedMissing.GetPaged(0, 15, "airDateUtc", "desc");
result.Records.First().Series.Should().NotBeNull();
result.Records.First().Series.Title.Should().Be("The Blacklist");
}
[Test, Order(1)]
public void cutoff_should_have_monitored_items()
{
@ -51,16 +20,6 @@ namespace NzbDrone.Integration.Test.ApiTests
result.Records.Should().NotBeEmpty();
}
[Test, Order(1)]
public void missing_should_not_have_unmonitored_items()
{
EnsureSeries(266189, "The Blacklist", false);
var result = WantedMissing.GetPaged(0, 15, "airDateUtc", "desc");
result.Records.Should().BeEmpty();
}
[Test, Order(1)]
public void cutoff_should_not_have_unmonitored_items()
{
@ -86,16 +45,6 @@ namespace NzbDrone.Integration.Test.ApiTests
result.Records.First().Series.Title.Should().Be("The Blacklist");
}
[Test, Order(2)]
public void missing_should_have_unmonitored_items()
{
EnsureSeries(266189, "The Blacklist", false);
var result = WantedMissing.GetPaged(0, 15, "airDateUtc", "desc", "monitored", "false");
result.Records.Should().NotBeEmpty();
}
[Test, Order(2)]
public void cutoff_should_have_unmonitored_items()
{

View File

@ -0,0 +1,61 @@
using System.Linq;
using FluentAssertions;
using NUnit.Framework;
namespace NzbDrone.Integration.Test.ApiTests.WantedTests
{
[TestFixture]
public class MissingFixture : IntegrationTest
{
[Test, Order(0)]
public void missing_should_be_empty()
{
EnsureNoSeries(266189, "The Blacklist");
var result = WantedMissing.GetPaged(0, 15, "airDateUtc", "desc");
result.Records.Should().BeEmpty();
}
[Test, Order(1)]
public void missing_should_have_monitored_items()
{
EnsureSeries(266189, "The Blacklist", true);
var result = WantedMissing.GetPaged(0, 15, "airDateUtc", "desc");
result.Records.Should().NotBeEmpty();
}
[Test, Order(1)]
public void missing_should_have_series()
{
EnsureSeries(266189, "The Blacklist", true);
var result = WantedMissing.GetPaged(0, 15, "airDateUtc", "desc");
result.Records.First().Series.Should().NotBeNull();
result.Records.First().Series.Title.Should().Be("The Blacklist");
}
[Test, Order(1)]
public void missing_should_not_have_unmonitored_items()
{
EnsureSeries(266189, "The Blacklist", false);
var result = WantedMissing.GetPaged(0, 15, "airDateUtc", "desc");
result.Records.Should().BeEmpty();
}
[Test, Order(2)]
public void missing_should_have_unmonitored_items()
{
EnsureSeries(266189, "The Blacklist", false);
var result = WantedMissing.GetPaged(0, 15, "airDateUtc", "desc", "monitored", "false");
result.Records.Should().NotBeEmpty();
}
}
}

View File

@ -107,7 +107,8 @@
<Compile Include="ApiTests\FileSystemFixture.cs" />
<Compile Include="ApiTests\ReleasePushFixture.cs" />
<Compile Include="ApiTests\SeriesLookupFixture.cs" />
<Compile Include="ApiTests\WantedFixture.cs" />
<Compile Include="ApiTests\WantedTests\CutoffUnmetFixture.cs" />
<Compile Include="ApiTests\WantedTests\MissingFixture.cs" />
<Compile Include="Client\ClientBase.cs" />
<Compile Include="Client\EpisodeClient.cs" />
<Compile Include="Client\IndexerClient.cs" />