mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-29 03:05:49 +00:00
Fixed broken test.
This commit is contained in:
parent
f221b00795
commit
852f97012f
1 changed files with 6 additions and 2 deletions
|
@ -63,6 +63,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
|
||||||
{
|
{
|
||||||
Series = _series,
|
Series = _series,
|
||||||
Quality = _quality,
|
Quality = _quality,
|
||||||
|
Episodes = new List<Episode> { new Episode() },
|
||||||
Path = @"C:\Test\Unsorted\The.Office.S03E115.DVDRip.XviD-OSiTV.avi"
|
Path = @"C:\Test\Unsorted\The.Office.S03E115.DVDRip.XviD-OSiTV.avi"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -207,7 +208,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
|
||||||
|
|
||||||
Mocker.GetMock<IParsingService>()
|
Mocker.GetMock<IParsingService>()
|
||||||
.Setup(c => c.GetLocalEpisode(It.IsAny<String>(), It.IsAny<Series>(), It.IsAny<ParsedEpisodeInfo>(), It.IsAny<Boolean>()))
|
.Setup(c => c.GetLocalEpisode(It.IsAny<String>(), It.IsAny<Series>(), It.IsAny<ParsedEpisodeInfo>(), It.IsAny<Boolean>()))
|
||||||
.Throws(new EpisodeNotFoundException("Episode not found"));
|
.Returns(new LocalEpisode() { Path = "test" });
|
||||||
|
|
||||||
_videoFiles = new List<String>
|
_videoFiles = new List<String>
|
||||||
{
|
{
|
||||||
|
@ -218,10 +219,13 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
|
||||||
|
|
||||||
GivenVideoFiles(_videoFiles);
|
GivenVideoFiles(_videoFiles);
|
||||||
|
|
||||||
Subject.GetImportDecisions(_videoFiles, _series);
|
var decisions = Subject.GetImportDecisions(_videoFiles, _series);
|
||||||
|
|
||||||
Mocker.GetMock<IParsingService>()
|
Mocker.GetMock<IParsingService>()
|
||||||
.Verify(c => c.GetLocalEpisode(It.IsAny<String>(), It.IsAny<Series>(), It.IsAny<ParsedEpisodeInfo>(), It.IsAny<Boolean>()), Times.Exactly(_videoFiles.Count));
|
.Verify(c => c.GetLocalEpisode(It.IsAny<String>(), It.IsAny<Series>(), It.IsAny<ParsedEpisodeInfo>(), It.IsAny<Boolean>()), Times.Exactly(_videoFiles.Count));
|
||||||
|
|
||||||
|
decisions.Should().HaveCount(3);
|
||||||
|
decisions.First().Rejections.Should().NotBeEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|
Loading…
Reference in a new issue