From 852f97012fedf22925a7c4fcaee3b65bb19ce8b5 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Tue, 12 May 2015 00:49:41 +0200 Subject: [PATCH] Fixed broken test. --- .../EpisodeImport/ImportDecisionMakerFixture.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/ImportDecisionMakerFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/ImportDecisionMakerFixture.cs index e5e3e0985..9e90fa811 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/ImportDecisionMakerFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/EpisodeImport/ImportDecisionMakerFixture.cs @@ -63,6 +63,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport { Series = _series, Quality = _quality, + Episodes = new List { new Episode() }, Path = @"C:\Test\Unsorted\The.Office.S03E115.DVDRip.XviD-OSiTV.avi" }; @@ -207,7 +208,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport Mocker.GetMock() .Setup(c => c.GetLocalEpisode(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) - .Throws(new EpisodeNotFoundException("Episode not found")); + .Returns(new LocalEpisode() { Path = "test" }); _videoFiles = new List { @@ -218,10 +219,13 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport GivenVideoFiles(_videoFiles); - Subject.GetImportDecisions(_videoFiles, _series); + var decisions = Subject.GetImportDecisions(_videoFiles, _series); Mocker.GetMock() .Verify(c => c.GetLocalEpisode(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny()), Times.Exactly(_videoFiles.Count)); + + decisions.Should().HaveCount(3); + decisions.First().Rejections.Should().NotBeEmpty(); } [Test]