sonarr-repo-only/NzbDrone.Core.Test/DecisionEngineTests/AllowedDownloadSpecificatio...

53 lines
1.8 KiB
C#
Raw Normal View History

2013-03-07 01:51:47 +00:00
using System.ComponentModel;
using Moq;
using NUnit.Framework;
using NzbDrone.Core.Model;
2013-02-19 02:19:38 +00:00
using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.Test.Framework;
2013-02-19 02:19:38 +00:00
namespace NzbDrone.Core.Test.DecisionEngineTests
{
[TestFixture]
public class AllowedDownloadSpecificationFixture : CoreTest
{
private EpisodeParseResult parseResult;
2013-03-07 01:51:47 +00:00
private Mock<IFetchableSpecification> pass1;
private Mock<IFetchableSpecification> pass2;
private Mock<IFetchableSpecification> pass3;
2013-03-07 01:51:47 +00:00
private Mock<IFetchableSpecification> fail1;
private Mock<IFetchableSpecification> fail2;
private Mock<IFetchableSpecification> fail3;
2013-03-07 01:51:47 +00:00
[SetUp]
public void Setup()
{
2013-03-07 01:51:47 +00:00
pass1 = new Mock<IFetchableSpecification>();
pass2 = new Mock<IFetchableSpecification>();
pass3 = new Mock<IFetchableSpecification>();
2013-03-07 01:51:47 +00:00
fail1 = new Mock<IFetchableSpecification>();
fail2 = new Mock<IFetchableSpecification>();
fail3 = new Mock<IFetchableSpecification>();
2013-03-07 01:51:47 +00:00
pass1.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>())).Returns(true);
pass2.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>())).Returns(true);
pass3.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>())).Returns(true);
2013-03-07 01:51:47 +00:00
fail1.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>())).Returns(false);
fail2.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>())).Returns(false);
fail3.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>())).Returns(false);
2013-03-07 01:51:47 +00:00
parseResult = new EpisodeParseResult();
2012-02-17 09:52:29 +00:00
2012-09-19 15:13:26 +00:00
}
[Test]
2013-03-07 01:51:47 +00:00
public void should_call_all_specifications()
{
2013-03-07 01:51:47 +00:00
throw new InvalidAsynchronousStateException();
}
}
}