Split wanted/missing and wanted/cutoffunmet imtegration tests

pull/2172/head
Mark McDowall 7 years ago
parent 5372ed5d40
commit 9c1d275403
No known key found for this signature in database
GPG Key ID: D4CEFA9A718052E0

@ -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()
{

@ -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();
}
}
}

@ -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" />

Loading…
Cancel
Save