1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-25 01:06:30 +00:00

Fixed broken file mover test

This commit is contained in:
Mark McDowall 2013-07-06 15:39:04 -07:00
parent 5644ca0e05
commit fa6888e964

View file

@ -40,20 +40,24 @@ namespace NzbDrone.Core.Test.MediaFileTests
.Build(); .Build();
Mocker.GetMock<ISeriesRepository>() Mocker.GetMock<ISeriesRepository>()
.Setup(e => e.Get(fakeSeries.Id)) .Setup(e => e.Get(fakeSeries.Id))
.Returns(fakeSeries); .Returns(fakeSeries);
Mocker.GetMock<IEpisodeService>() Mocker.GetMock<IEpisodeService>()
.Setup(e => e.GetEpisodesByFileId(file.Id)) .Setup(e => e.GetEpisodesByFileId(file.Id))
.Returns(fakeEpisode); .Returns(fakeEpisode);
Mocker.GetMock<IBuildFileNames>() Mocker.GetMock<IBuildFileNames>()
.Setup(e => e.BuildFilename(fakeEpisode, fakeSeries, It.IsAny<EpisodeFile>())) .Setup(e => e.BuildFilename(fakeEpisode, fakeSeries, It.IsAny<EpisodeFile>()))
.Returns(filename); .Returns(filename);
Mocker.GetMock<IBuildFileNames>() Mocker.GetMock<IBuildFileNames>()
.Setup(e => e.BuildFilePath(It.IsAny<Series>(), fakeEpisode.First().SeasonNumber, filename, ".avi")) .Setup(e => e.BuildFilePath(It.IsAny<Series>(), fakeEpisode.First().SeasonNumber, filename, ".avi"))
.Returns(fi); .Returns(fi);
Mocker.GetMock<IDiskProvider>()
.Setup(s => s.FileExists(fi))
.Returns(true);
var result = Subject.MoveEpisodeFile(file); var result = Subject.MoveEpisodeFile(file);