You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sonarr/NzbDrone.Core.Test/DecisionEngineTests/AllowedReleaseGroupSpecific...

51 lines
1.4 KiB

using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.DecisionEngine.Specifications;
using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Test.Framework;
namespace NzbDrone.Core.Test.DecisionEngineTests
{
[TestFixture]
12 years ago
public class AllowedReleaseGroupSpecificationFixture : CoreTest<AllowedReleaseGroupSpecification>
{
private RemoteEpisode _parseResult;
[SetUp]
public void Setup()
{
_parseResult = new RemoteEpisode
{
Report = new ReportInfo
{
ReleaseGroup = "2HD"
}
};
}
[Test]
public void should_be_true_when_allowedReleaseGroups_is_empty()
{
Subject.IsSatisfiedBy(_parseResult).Should().BeTrue();
}
[Test]
public void should_be_true_when_allowedReleaseGroups_is_nzbs_releaseGroup()
{
Subject.IsSatisfiedBy(_parseResult).Should().BeTrue();
}
[Test]
public void should_be_true_when_allowedReleaseGroups_contains_nzbs_releaseGroup()
{
Subject.IsSatisfiedBy(_parseResult).Should().BeTrue();
}
[Test]
public void should_be_false_when_allowedReleaseGroups_does_not_contain_nzbs_releaseGroup()
{
Subject.IsSatisfiedBy(_parseResult).Should().BeFalse();
}
}
}