|
|
@ -76,6 +76,9 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var mocker = new AutoMoqer(MockBehavior.Strict);
|
|
|
|
var mocker = new AutoMoqer(MockBehavior.Strict);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var series = Builder<Series>.CreateNew()
|
|
|
|
|
|
|
|
.With(s => s.SeriesId = 12).Build();
|
|
|
|
|
|
|
|
|
|
|
|
mocker.GetMock<EpisodeProvider>()
|
|
|
|
mocker.GetMock<EpisodeProvider>()
|
|
|
|
.Setup(c => c.GetEpisodeBySeries(12))
|
|
|
|
.Setup(c => c.GetEpisodeBySeries(12))
|
|
|
|
.Returns(new List<Episode>());
|
|
|
|
.Returns(new List<Episode>());
|
|
|
@ -85,9 +88,9 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|
|
|
mocker.GetMock<MediaFileProvider>()
|
|
|
|
mocker.GetMock<MediaFileProvider>()
|
|
|
|
.Setup(e => e.DeleteOrphaned()).Returns(0);
|
|
|
|
.Setup(e => e.DeleteOrphaned()).Returns(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mocker.GetMock<DiskProvider>()
|
|
|
|
var series = Builder<Series>.CreateNew()
|
|
|
|
.Setup(s => s.FolderExists(series.Path))
|
|
|
|
.With(s => s.SeriesId = 12).Build();
|
|
|
|
.Returns(true);
|
|
|
|
|
|
|
|
|
|
|
|
//Act
|
|
|
|
//Act
|
|
|
|
mocker.Resolve<DiskScanProvider>().Scan(series);
|
|
|
|
mocker.Resolve<DiskScanProvider>().Scan(series);
|
|
|
|