mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-30 23:45:46 +02:00
fixed some tests.
This commit is contained in:
@@ -1,27 +1,18 @@
|
||||
|
||||
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FizzWare.NBuilder;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.DecisionEngine.Specifications;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Tv;
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Core.DecisionEngine;
|
||||
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Test.DecisionEngineTests
|
||||
{
|
||||
[TestFixture]
|
||||
|
||||
public class AllowedReleaseGroupSpecificationFixture : CoreTest
|
||||
|
||||
public class AllowedReleaseGroupSpecificationFixture : CoreTest<AllowedReleaseGroupSpecification>
|
||||
{
|
||||
private EpisodeParseResult parseResult;
|
||||
|
||||
@@ -43,29 +34,25 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
||||
[Test]
|
||||
public void should_be_true_when_allowedReleaseGroups_is_empty()
|
||||
{
|
||||
//Mocker.GetMock<IConfigService>().SetupGet(s => s.AllowedReleaseGroups).Returns(String.Empty);
|
||||
Mocker.Resolve<AllowedReleaseGroupSpecification>().IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
Subject.IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_true_when_allowedReleaseGroups_is_nzbs_releaseGroup()
|
||||
{
|
||||
//Mocker.GetMock<IConfigService>().SetupGet(s => s.AllowedReleaseGroups).Returns("2HD");
|
||||
Mocker.Resolve<AllowedReleaseGroupSpecification>().IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
Subject.IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_true_when_allowedReleaseGroups_contains_nzbs_releaseGroup()
|
||||
{
|
||||
//Mocker.GetMock<IConfigService>().SetupGet(s => s.AllowedReleaseGroups).Returns("2HD, LOL");
|
||||
Mocker.Resolve<AllowedReleaseGroupSpecification>().IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
Subject.IsSatisfiedBy(parseResult).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_false_when_allowedReleaseGroups_does_not_contain_nzbs_releaseGroup()
|
||||
{
|
||||
//Mocker.GetMock<IConfigService>().SetupGet(s => s.AllowedReleaseGroups).Returns("LOL,DTD");
|
||||
Mocker.Resolve<AllowedReleaseGroupSpecification>().IsSatisfiedBy(parseResult).Should().BeFalse();
|
||||
Subject.IsSatisfiedBy(parseResult).Should().BeFalse();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user