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.
49 lines
1.7 KiB
49 lines
1.7 KiB
using System.Linq;
|
|
using FizzWare.NBuilder;
|
|
using FluentAssertions;
|
|
using NUnit.Framework;
|
|
using NzbDrone.Core.MediaFiles.EpisodeImport.Specifications;
|
|
using NzbDrone.Core.Parser.Model;
|
|
using NzbDrone.Core.Qualities;
|
|
using NzbDrone.Core.Test.Framework;
|
|
using NzbDrone.Core.Tv;
|
|
|
|
namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
|
{
|
|
[TestFixture]
|
|
public class NotSampleSpecificationFixture : CoreTest<NotSampleSpecification>
|
|
{
|
|
private Series _series;
|
|
private LocalEpisode _localEpisode;
|
|
|
|
[SetUp]
|
|
public void Setup()
|
|
{
|
|
_series = Builder<Series>.CreateNew()
|
|
.With(s => s.SeriesType = SeriesTypes.Standard)
|
|
.Build();
|
|
|
|
var episodes = Builder<Episode>.CreateListOfSize(1)
|
|
.All()
|
|
.With(e => e.SeasonNumber = 1)
|
|
.Build()
|
|
.ToList();
|
|
|
|
_localEpisode = new LocalEpisode
|
|
{
|
|
Path = @"C:\Test\30 Rock\30.rock.s01e01.avi",
|
|
Episodes = episodes,
|
|
Series = _series,
|
|
Quality = new QualityModel(Quality.MP3256)
|
|
};
|
|
}
|
|
|
|
[Test]
|
|
public void should_return_true_for_existing_file()
|
|
{
|
|
_localEpisode.ExistingFile = true;
|
|
Subject.IsSatisfiedBy(_localEpisode).Accepted.Should().BeTrue();
|
|
}
|
|
}
|
|
}
|