Replaced EpisodeService with IEpisodeService
This commit is contained in:
parent
563db453fc
commit
8a34f1096d
|
@ -80,7 +80,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(false);
|
||||
|
||||
|
@ -101,7 +101,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(false);
|
||||
|
||||
|
@ -122,7 +122,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(false);
|
||||
|
||||
|
@ -143,7 +143,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(false);
|
||||
|
||||
|
@ -164,7 +164,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(false);
|
||||
|
||||
|
@ -185,7 +185,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(false);
|
||||
|
||||
|
@ -206,7 +206,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(false);
|
||||
|
||||
|
@ -227,7 +227,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(false);
|
||||
|
||||
|
@ -248,7 +248,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(true);
|
||||
|
||||
|
@ -269,7 +269,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(true);
|
||||
|
||||
|
@ -290,7 +290,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(true);
|
||||
|
||||
|
@ -311,7 +311,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(true);
|
||||
|
||||
|
@ -333,7 +333,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(true);
|
||||
|
||||
|
@ -355,7 +355,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(true);
|
||||
|
||||
|
@ -378,7 +378,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
|
||||
Mocker.GetMock<QualityTypeProvider>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
.Returns(true);
|
||||
|
||||
|
|
|
@ -59,8 +59,8 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
var singleEpisodeList = new List<Episode> { firstEpisode };
|
||||
var doubleEpisodeList = new List<Episode> { firstEpisode, secondEpisode };
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(c => c.GetEpisodesByParseResult(parseResultSingle)).Returns(singleEpisodeList);
|
||||
Mocker.GetMock<EpisodeService>().Setup(c => c.GetEpisodesByParseResult(parseResultMulti)).Returns(doubleEpisodeList);
|
||||
Mocker.GetMock<IEpisodeService>().Setup(c => c.GetEpisodesByParseResult(parseResultSingle)).Returns(singleEpisodeList);
|
||||
Mocker.GetMock<IEpisodeService>().Setup(c => c.GetEpisodesByParseResult(parseResultMulti)).Returns(doubleEpisodeList);
|
||||
|
||||
Mocker.GetMock<ISeriesRepository>().Setup(c => c.GetByTitle(parseResultMulti.CleanTitle)).Returns(fakeSeries);
|
||||
Mocker.GetMock<ISeriesRepository>().Setup(c => c.GetByTitle(parseResultSingle.CleanTitle)).Returns(fakeSeries);
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
WithStrictMocker();
|
||||
WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
//Act
|
||||
|
@ -67,7 +67,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
Mocker.GetMock<EpisodeSearchJob>()
|
||||
|
@ -99,7 +99,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
//Act
|
||||
|
@ -129,10 +129,10 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.GetEpisodeNumbersBySeason(1, 1)).Returns(new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 });
|
||||
|
||||
//Act
|
||||
|
@ -163,10 +163,10 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.GetEpisodeNumbersBySeason(1, 1)).Returns(episodes.Select(e => e.EpisodeNumber).ToList());
|
||||
|
||||
//Act
|
||||
|
@ -205,10 +205,10 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.GetEpisodeNumbersBySeason(1, 1)).Returns(new List<int> { 1, 2, 3, 4, 5 });
|
||||
|
||||
//Act
|
||||
|
@ -246,7 +246,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
//Act
|
||||
|
@ -285,7 +285,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
//WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
//Act
|
||||
|
@ -325,7 +325,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
//Act
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
//Setup
|
||||
var episodes = new List<Episode>();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
//Act
|
||||
|
@ -86,7 +86,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
.With(e => e.AirDate = DateTime.Today.AddDays(-35))
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
Mocker.GetMock<EpisodeSearchJob>().Setup(c => c.Start(It.IsAny<ProgressNotification>(), It.Is<object>(d => d.GetPropertyValue<int>("EpisodeId") >= 0)));
|
||||
|
@ -122,7 +122,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
//Act
|
||||
|
@ -161,7 +161,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
//WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
//Act
|
||||
|
@ -201,7 +201,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
WithEnableBacklogSearching();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
|
||||
|
||||
//Act
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
.With(e => e.AirDate = DateTime.Today.AddDays(-1))
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(c => c.GetEpisodesBySeason(1, 1)).Returns(_episodes);
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
.With(e => e.AirDate = DateTime.Today.AddDays(2))
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(c => c.GetEpisodesBySeason(1, 1)).Returns(episodes);
|
||||
|
||||
Mocker.GetMock<SearchProvider>()
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
Mocker.GetMock<ISeriesRepository>().Setup(s => s.Get(It.IsAny<int>()))
|
||||
.Returns(series);
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(s => s.GetEpisodesByFileId(episodeFile.EpisodeFileId))
|
||||
Mocker.GetMock<IEpisodeService>().Setup(s => s.GetEpisodesByFileId(episodeFile.EpisodeFileId))
|
||||
.Returns(episode);
|
||||
|
||||
Mocker.GetMock<MediaFileProvider>().Setup(s => s.GetNewFilename(It.IsAny<IList<Episode>>(), series, QualityTypes.Unknown, false, It.IsAny<EpisodeFile>()))
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(e => e.FileExists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByFileId(It.IsAny<int>()))
|
||||
.Returns(new List<Episode>());
|
||||
|
||||
|
@ -63,7 +63,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
//Assert
|
||||
Mocker.VerifyAllMocks();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Verify(e => e.GetEpisodesByFileId(It.IsAny<int>()), Times.Exactly(10));
|
||||
|
||||
Mocker.GetMock<MediaFileProvider>()
|
||||
|
@ -80,11 +80,11 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(e => e.FileExists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByFileId(It.IsAny<int>()))
|
||||
.Returns(new List<Episode> { new Episode { EpisodeFile = new EpisodeFile { EpisodeFileId = 10 } }, new Episode { EpisodeFile = new EpisodeFile { EpisodeFileId = 10 } } });
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.UpdateEpisode(It.IsAny<Episode>()));
|
||||
|
||||
Mocker.GetMock<MediaFileProvider>()
|
||||
|
@ -100,10 +100,10 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
//Assert
|
||||
Mocker.VerifyAllMocks();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Verify(e => e.GetEpisodesByFileId(It.IsAny<int>()), Times.Exactly(10));
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Verify(e => e.UpdateEpisode(It.Is<Episode>(g => g.EpisodeFileId == 0)), Times.Exactly(20));
|
||||
|
||||
Mocker.GetMock<MediaFileProvider>()
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(p => p.Exists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(new List<Episode> { fakeEpisode });
|
||||
|
||||
//Act
|
||||
|
@ -94,7 +94,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
|
||||
With80MBFile();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(new List<Episode> { fakeEpisode });
|
||||
|
||||
//Act
|
||||
|
@ -124,7 +124,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(p => p.Exists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(new List<Episode> { fakeEpisode });
|
||||
|
||||
//Act
|
||||
|
@ -194,7 +194,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(p => p.Exists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(c => c.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>()))
|
||||
.Returns(new List<Episode>());
|
||||
|
||||
|
@ -225,7 +225,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(p => p.Exists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(new List<Episode> { fakeEpisode });
|
||||
|
||||
//Act
|
||||
|
@ -257,7 +257,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(p => p.Exists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(fakeEpisodes);
|
||||
|
||||
//Act
|
||||
|
@ -290,7 +290,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(p => p.Exists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(fakeEpisodes);
|
||||
|
||||
//Act
|
||||
|
@ -328,7 +328,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(p => p.Exists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(new List<Episode> { fakeEpisode1, fakeEpisode2 });
|
||||
|
||||
//Act
|
||||
|
@ -357,7 +357,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(p => p.Exists(It.IsAny<String>()))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(new List<Episode> { fakeEpisode});
|
||||
|
||||
//Act
|
||||
|
@ -380,7 +380,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
|
||||
With80MBFile();
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(s => s.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>()))
|
||||
Mocker.GetMock<IEpisodeService>().Setup(s => s.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>()))
|
||||
.Returns(new List<Episode>());
|
||||
|
||||
Mocker.GetMock<DiskProvider>().Setup(s => s.IsChildOfPath(path, series.Path))
|
||||
|
@ -388,7 +388,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
|
||||
Mocker.Resolve<DiskScanProvider>().ImportFile(series, path);
|
||||
|
||||
Mocker.Verify<EpisodeService>(s => s.GetEpisodesByParseResult(It.Is<EpisodeParseResult>(p => p.SceneSource)), Times.Once());
|
||||
Mocker.Verify<IEpisodeService>(s => s.GetEpisodesByParseResult(It.Is<EpisodeParseResult>(p => p.SceneSource)), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -403,7 +403,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
|
||||
With80MBFile();
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Setup(s => s.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>()))
|
||||
Mocker.GetMock<IEpisodeService>().Setup(s => s.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>()))
|
||||
.Returns(new List<Episode>());
|
||||
|
||||
Mocker.GetMock<DiskProvider>().Setup(s => s.IsChildOfPath(path, series.Path))
|
||||
|
@ -411,7 +411,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
|
||||
Mocker.Resolve<DiskScanProvider>().ImportFile(series, path);
|
||||
|
||||
Mocker.Verify<EpisodeService>(s => s.GetEpisodesByParseResult(It.Is<EpisodeParseResult>(p => p.SceneSource == false)), Times.Once());
|
||||
Mocker.Verify<IEpisodeService>(s => s.GetEpisodesByParseResult(It.Is<EpisodeParseResult>(p => p.SceneSource == false)), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -454,7 +454,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(s => s.GetRunTime(path))
|
||||
.Returns(600);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(new List<Episode> { fakeEpisode });
|
||||
|
||||
var result = Mocker.Resolve<DiskScanProvider>().ImportFile(_series, path);
|
||||
|
@ -481,7 +481,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(s => s.GetRunTime(path))
|
||||
.Returns(60);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(new List<Episode> { fakeEpisode });
|
||||
|
||||
var result = Mocker.Resolve<DiskScanProvider>().ImportFile(_series, path);
|
||||
|
@ -512,7 +512,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(s => s.GetRunTime(path))
|
||||
.Returns(60);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(new List<Episode> { fakeEpisode });
|
||||
|
||||
var result = Mocker.Resolve<DiskScanProvider>().ImportFile(_series, path);
|
||||
|
@ -552,16 +552,16 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
Mocker.GetMock<MediaFileProvider>().Verify(p => p.Add(It.IsAny<EpisodeFile>()), Times.Once());
|
||||
|
||||
//Get the count of episodes linked
|
||||
var count = Mocker.GetMock<EpisodeService>().Object.GetEpisodesByParseResult(null).Count;
|
||||
var count = Mocker.GetMock<IEpisodeService>().Object.GetEpisodesByParseResult(null).Count;
|
||||
|
||||
Mocker.GetMock<EpisodeService>().Verify(p => p.UpdateEpisode(It.Is<Episode>(e => e.EpisodeFileId == result.EpisodeFileId)), Times.Exactly(count));
|
||||
Mocker.GetMock<IEpisodeService>().Verify(p => p.UpdateEpisode(It.Is<Episode>(e => e.EpisodeFileId == result.EpisodeFileId)), Times.Exactly(count));
|
||||
}
|
||||
|
||||
private static void VerifySkipImport(EpisodeFile result, AutoMoqer Mocker)
|
||||
{
|
||||
result.Should().BeNull();
|
||||
Mocker.GetMock<MediaFileProvider>().Verify(p => p.Add(It.IsAny<EpisodeFile>()), Times.Never());
|
||||
Mocker.GetMock<EpisodeService>().Verify(p => p.UpdateEpisode(It.IsAny<Episode>()), Times.Never());
|
||||
Mocker.GetMock<IEpisodeService>().Verify(p => p.UpdateEpisode(It.IsAny<Episode>()), Times.Never());
|
||||
Mocker.GetMock<DiskProvider>().Verify(p => p.DeleteFile(It.IsAny<string>()), Times.Never());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(e => e.Get(fakeSeries.SeriesId))
|
||||
.Returns(fakeSeries);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByFileId(file.EpisodeFileId))
|
||||
.Returns(fakeEpisode);
|
||||
|
||||
|
@ -100,7 +100,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(e => e.Get(fakeSeries.SeriesId))
|
||||
.Returns(fakeSeries);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByFileId(file.EpisodeFileId))
|
||||
.Returns(fakeEpisode);
|
||||
|
||||
|
@ -163,7 +163,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
.Setup(e => e.Get(fakeSeries.SeriesId))
|
||||
.Returns(fakeSeries);
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(e => e.GetEpisodesByFileId(file.EpisodeFileId))
|
||||
.Returns(fakeEpisode);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
|||
Mocker.GetMock<ISeriesRepository>()
|
||||
.Setup(c => c.Update(It.Is<Series>(s => s.LastDiskSync != null))).Verifiable();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(c => c.GetEpisodeBySeries(It.IsAny<int>()))
|
||||
.Returns(new List<Episode> { new Episode() });
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadProviderTests
|
|||
.All().With(s => s.SeriesId = 5)
|
||||
.Build().ToList();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(c => c.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(episodes);
|
||||
|
||||
return Builder<EpisodeParseResult>.CreateNew()
|
||||
|
@ -104,10 +104,10 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadProviderTests
|
|||
Mocker.GetMock<HistoryProvider>()
|
||||
.Verify(s => s.Add(It.Is<History>(h => h.EpisodeId == 99 && h.SeriesId == 5)), Times.Once());
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Verify(c => c.MarkEpisodeAsFetched(12));
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Verify(c => c.MarkEpisodeAsFetched(99));
|
||||
|
||||
Mocker.GetMock<ExternalNotificationProvider>()
|
||||
|
@ -139,10 +139,10 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadProviderTests
|
|||
Mocker.GetMock<HistoryProvider>()
|
||||
.Verify(s => s.Add(It.Is<History>(h => h.EpisodeId == 99 && h.SeriesId == 5)), Times.Once());
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Verify(c => c.MarkEpisodeAsFetched(12));
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Verify(c => c.MarkEpisodeAsFetched(99));
|
||||
|
||||
Mocker.GetMock<ExternalNotificationProvider>()
|
||||
|
@ -165,7 +165,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadProviderTests
|
|||
.Verify(s => s.Add(It.IsAny<History>()), Times.Never());
|
||||
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Verify(c => c.MarkEpisodeAsFetched(It.IsAny<int>()), Times.Never());
|
||||
|
||||
Mocker.GetMock<ExternalNotificationProvider>()
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
{
|
||||
WithStrictMocker();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(c => c.GetEpisodeBySeries(12))
|
||||
.Returns(new List<Episode>());
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
|
|||
.With(e => e.EpisodeNumber = 1)
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.GetEpisodesByFileId(episodeFile.EpisodeFileId))
|
||||
.Returns(new List<Episode> { episode });
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata
|
|||
.With(e => e.SeasonNumber = 1)
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.GetEpisodesByFileId(episodeFile.EpisodeFileId))
|
||||
.Returns(episodes.ToList());
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
|
||||
WithStrictMocker();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(c => c.EpisodesWithFiles()).Returns(episodes);
|
||||
|
||||
Mocker.GetMock<MediaFileProvider>()
|
||||
|
@ -91,7 +91,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
|
||||
WithStrictMocker();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(c => c.EpisodesWithFiles()).Returns(episodes);
|
||||
|
||||
Mocker.GetMock<MediaFileProvider>()
|
||||
|
@ -138,7 +138,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
|
||||
WithStrictMocker();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(c => c.EpisodesWithFiles()).Returns(episodes);
|
||||
|
||||
Mocker.GetMock<MediaFileProvider>()
|
||||
|
@ -187,7 +187,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
|
||||
WithStrictMocker();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(c => c.EpisodesWithFiles()).Returns(episodes);
|
||||
|
||||
Mocker.GetMock<MediaFileProvider>()
|
||||
|
@ -236,7 +236,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
|||
|
||||
WithStrictMocker();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(c => c.EpisodesWithFiles()).Returns(episodes);
|
||||
|
||||
Mocker.GetMock<MediaFileProvider>()
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchTests
|
|||
.CreateListOfSize(1)
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>()))
|
||||
.Returns(_episodes);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchTests
|
|||
{
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public TestSearch(ISeriesService seriesService, EpisodeService episodeService, DownloadProvider downloadProvider,
|
||||
public TestSearch(ISeriesService seriesService, IEpisodeService episodeService, DownloadProvider downloadProvider,
|
||||
IndexerService indexerService, SceneMappingProvider sceneMappingProvider,
|
||||
AllowedDownloadSpecification allowedDownloadSpecification, SearchHistoryProvider searchHistoryProvider,ISeriesRepository seriesRepository)
|
||||
: base(seriesService, seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingProvider,
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace NzbDrone.Core.Test.ProviderTests.TvRageMappingProviderTests
|
|||
.With(s => s.UtcOffset = -8)
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<EpisodeService>()
|
||||
Mocker.GetMock<IEpisodeService>()
|
||||
.Setup(s => s.GetEpisode(_series.SeriesId, 1, 1))
|
||||
.Returns(_episode);
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeProviderTests
|
|||
// ReSharper disable InconsistentNaming
|
||||
public class EpisodeProviderTest_GetEpisodesByParseResult : SqlCeTest
|
||||
{
|
||||
private EpisodeService episodeService;
|
||||
private IEpisodeService episodeService;
|
||||
|
||||
private Series fakeSeries;
|
||||
private Series fakeDailySeries;
|
||||
|
|
|
@ -10,10 +10,10 @@ namespace NzbDrone.Core.DecisionEngine
|
|||
public class AcceptableSizeSpecification
|
||||
{
|
||||
private readonly QualityTypeProvider _qualityTypeProvider;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public AcceptableSizeSpecification(QualityTypeProvider qualityTypeProvider, EpisodeService episodeService)
|
||||
public AcceptableSizeSpecification(QualityTypeProvider qualityTypeProvider, IEpisodeService episodeService)
|
||||
{
|
||||
_qualityTypeProvider = qualityTypeProvider;
|
||||
_episodeService = episodeService;
|
||||
|
|
|
@ -8,11 +8,11 @@ namespace NzbDrone.Core.DecisionEngine
|
|||
{
|
||||
public class MonitoredEpisodeSpecification
|
||||
{
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly ISeriesRepository _seriesRepository;
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public MonitoredEpisodeSpecification(EpisodeService episodeService, ISeriesRepository seriesRepository)
|
||||
public MonitoredEpisodeSpecification(IEpisodeService episodeService, ISeriesRepository seriesRepository)
|
||||
{
|
||||
_episodeService = episodeService;
|
||||
_seriesRepository = seriesRepository;
|
||||
|
|
|
@ -8,12 +8,12 @@ namespace NzbDrone.Core.DecisionEngine
|
|||
{
|
||||
public class UpgradeHistorySpecification
|
||||
{
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly HistoryProvider _historyProvider;
|
||||
private readonly QualityUpgradeSpecification _qualityUpgradeSpecification;
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public UpgradeHistorySpecification(EpisodeService episodeService, HistoryProvider historyProvider, QualityUpgradeSpecification qualityUpgradeSpecification)
|
||||
public UpgradeHistorySpecification(IEpisodeService episodeService, HistoryProvider historyProvider, QualityUpgradeSpecification qualityUpgradeSpecification)
|
||||
{
|
||||
_episodeService = episodeService;
|
||||
_historyProvider = historyProvider;
|
||||
|
|
|
@ -13,14 +13,14 @@ namespace NzbDrone.Core.Jobs
|
|||
{
|
||||
public class BacklogSearchJob : IJob
|
||||
{
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly EpisodeSearchJob _episodeSearchJob;
|
||||
private readonly SeasonSearchJob _seasonSearchJob;
|
||||
private readonly ConfigProvider _configProvider;
|
||||
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public BacklogSearchJob(EpisodeService episodeService, EpisodeSearchJob episodeSearchJob,
|
||||
public BacklogSearchJob(IEpisodeService episodeService, EpisodeSearchJob episodeSearchJob,
|
||||
SeasonSearchJob seasonSearchJob, ConfigProvider configProvider)
|
||||
{
|
||||
_episodeService = episodeService;
|
||||
|
|
|
@ -13,12 +13,12 @@ namespace NzbDrone.Core.Jobs
|
|||
{
|
||||
private readonly HandbrakeProvider _handbrakeProvider;
|
||||
private readonly AtomicParsleyProvider _atomicParsleyProvider;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public ConvertEpisodeJob(HandbrakeProvider handbrakeProvider, AtomicParsleyProvider atomicParsleyProvider,
|
||||
EpisodeService episodeService)
|
||||
IEpisodeService episodeService)
|
||||
{
|
||||
_handbrakeProvider = handbrakeProvider;
|
||||
_atomicParsleyProvider = atomicParsleyProvider;
|
||||
|
|
|
@ -12,14 +12,14 @@ namespace NzbDrone.Core.Jobs
|
|||
{
|
||||
public class EpisodeSearchJob : IJob
|
||||
{
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly UpgradePossibleSpecification _upgradePossibleSpecification;
|
||||
private readonly EpisodeSearch _episodeSearch;
|
||||
private readonly DailyEpisodeSearch _dailyEpisodeSearch;
|
||||
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public EpisodeSearchJob(EpisodeService episodeService, UpgradePossibleSpecification upgradePossibleSpecification,
|
||||
public EpisodeSearchJob(IEpisodeService episodeService, UpgradePossibleSpecification upgradePossibleSpecification,
|
||||
EpisodeSearch episodeSearch, DailyEpisodeSearch dailyEpisodeSearch)
|
||||
{
|
||||
if(dailyEpisodeSearch == null) throw new ArgumentNullException("dailyEpisodeSearch");
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace NzbDrone.Core.Jobs
|
|||
public class ImportNewSeriesJob : IJob
|
||||
{
|
||||
private readonly ISeriesService _seriesService;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly MediaFileProvider _mediaFileProvider;
|
||||
private readonly UpdateInfoJob _updateInfoJob;
|
||||
private readonly DiskScanJob _diskScanJob;
|
||||
|
@ -30,7 +30,7 @@ namespace NzbDrone.Core.Jobs
|
|||
|
||||
private List<int> _attemptedSeries;
|
||||
|
||||
public ImportNewSeriesJob(ISeriesService seriesService, EpisodeService episodeService,
|
||||
public ImportNewSeriesJob(ISeriesService seriesService, IEpisodeService episodeService,
|
||||
MediaFileProvider mediaFileProvider, UpdateInfoJob updateInfoJob,
|
||||
DiskScanJob diskScanJob, BannerDownloadJob bannerDownloadJob,
|
||||
ISeasonRepository seasonRepository, XemUpdateJob xemUpdateJob, ISeriesRepository seriesRepository,ISeasonService seasonService)
|
||||
|
|
|
@ -13,13 +13,13 @@ namespace NzbDrone.Core.Jobs
|
|||
{
|
||||
public class PastWeekBacklogSearchJob : IJob
|
||||
{
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly EpisodeSearchJob _episodeSearchJob;
|
||||
private readonly ConfigProvider _configProvider;
|
||||
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public PastWeekBacklogSearchJob(EpisodeService episodeService, EpisodeSearchJob episodeSearchJob,
|
||||
public PastWeekBacklogSearchJob(IEpisodeService episodeService, EpisodeSearchJob episodeSearchJob,
|
||||
ConfigProvider configProvider)
|
||||
{
|
||||
_episodeService = episodeService;
|
||||
|
|
|
@ -13,13 +13,13 @@ namespace NzbDrone.Core.Jobs
|
|||
{
|
||||
public class RecentBacklogSearchJob : IJob
|
||||
{
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly EpisodeSearchJob _episodeSearchJob;
|
||||
private readonly ConfigProvider _configProvider;
|
||||
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public RecentBacklogSearchJob(EpisodeService episodeService, EpisodeSearchJob episodeSearchJob,
|
||||
public RecentBacklogSearchJob(IEpisodeService episodeService, EpisodeSearchJob episodeSearchJob,
|
||||
ConfigProvider configProvider)
|
||||
{
|
||||
_episodeService = episodeService;
|
||||
|
|
|
@ -13,12 +13,12 @@ namespace NzbDrone.Core.Jobs
|
|||
{
|
||||
private readonly SearchProvider _searchProvider;
|
||||
private readonly EpisodeSearchJob _episodeSearchJob;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public SeasonSearchJob(SearchProvider searchProvider, EpisodeSearchJob episodeSearchJob,
|
||||
EpisodeService episodeService)
|
||||
IEpisodeService episodeService)
|
||||
{
|
||||
_searchProvider = searchProvider;
|
||||
_episodeSearchJob = episodeSearchJob;
|
||||
|
|
|
@ -14,13 +14,13 @@ namespace NzbDrone.Core.Jobs
|
|||
public class UpdateInfoJob : IJob
|
||||
{
|
||||
private readonly ISeriesService _seriesService;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly ReferenceDataProvider _referenceDataProvider;
|
||||
private readonly ConfigProvider _configProvider;
|
||||
private readonly ISeriesRepository _seriesRepository;
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public UpdateInfoJob(ISeriesService seriesService, EpisodeService episodeService,
|
||||
public UpdateInfoJob(ISeriesService seriesService, IEpisodeService episodeService,
|
||||
ReferenceDataProvider referenceDataProvider, ConfigProvider configProvider, ISeriesRepository seriesRepository)
|
||||
{
|
||||
_seriesService = seriesService;
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace NzbDrone.Core.Providers
|
|||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
private static readonly string[] mediaExtentions = new[] { ".mkv", ".avi", ".wmv", ".mp4", ".mpg", ".mpeg", ".xvid", ".flv", ".mov", ".rm", ".rmvb", ".divx", ".dvr-ms", ".ts", ".ogm", ".m4v", ".strm" };
|
||||
private readonly DiskProvider _diskProvider;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly MediaFileProvider _mediaFileProvider;
|
||||
private readonly ISeriesService _seriesService;
|
||||
private readonly ExternalNotificationProvider _externalNotificationProvider;
|
||||
|
@ -27,7 +27,7 @@ namespace NzbDrone.Core.Providers
|
|||
private readonly MediaInfoProvider _mediaInfoProvider;
|
||||
private readonly ISeriesRepository _seriesRepository;
|
||||
|
||||
public DiskScanProvider(DiskProvider diskProvider, EpisodeService episodeService,
|
||||
public DiskScanProvider(DiskProvider diskProvider, IEpisodeService episodeService,
|
||||
ISeriesService seriesService, MediaFileProvider mediaFileProvider,
|
||||
ExternalNotificationProvider externalNotificationProvider, DownloadProvider downloadProvider,
|
||||
SignalRProvider signalRProvider, ConfigProvider configProvider,
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace NzbDrone.Core.Providers
|
|||
{
|
||||
private readonly SabProvider _sabProvider;
|
||||
private readonly HistoryProvider _historyProvider;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly ExternalNotificationProvider _externalNotificationProvider;
|
||||
private readonly ConfigProvider _configProvider;
|
||||
private readonly BlackholeProvider _blackholeProvider;
|
||||
|
@ -25,7 +25,7 @@ namespace NzbDrone.Core.Providers
|
|||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public DownloadProvider(SabProvider sabProvider, HistoryProvider historyProvider,
|
||||
EpisodeService episodeService, ExternalNotificationProvider externalNotificationProvider,
|
||||
IEpisodeService episodeService, ExternalNotificationProvider externalNotificationProvider,
|
||||
ConfigProvider configProvider, BlackholeProvider blackholeProvider,
|
||||
SignalRProvider signalRProvider, PneumaticProvider pneumaticProvider,
|
||||
NzbgetProvider nzbgetProvider)
|
||||
|
|
|
@ -18,9 +18,9 @@ namespace NzbDrone.Core.Providers
|
|||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
private readonly ConfigProvider _configProvider;
|
||||
private readonly IDatabase _database;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
|
||||
public MediaFileProvider(EpisodeService episodeService, ConfigProvider configProvider, IDatabase database)
|
||||
public MediaFileProvider(IEpisodeService episodeService, ConfigProvider configProvider, IDatabase database)
|
||||
{
|
||||
_episodeService = episodeService;
|
||||
_configProvider = configProvider;
|
||||
|
|
|
@ -15,10 +15,10 @@ namespace NzbDrone.Core.Providers.Metadata
|
|||
protected readonly ConfigProvider _configProvider;
|
||||
protected readonly DiskProvider _diskProvider;
|
||||
protected readonly BannerProvider _bannerProvider;
|
||||
protected readonly EpisodeService _episodeService;
|
||||
protected readonly IEpisodeService _episodeService;
|
||||
|
||||
protected MetadataBase(ConfigProvider configProvider, DiskProvider diskProvider,
|
||||
BannerProvider bannerProvider, EpisodeService episodeService)
|
||||
BannerProvider bannerProvider, IEpisodeService episodeService)
|
||||
{
|
||||
_configProvider = configProvider;
|
||||
_diskProvider = diskProvider;
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace NzbDrone.Core.Providers.Metadata
|
|||
public class Xbmc : MetadataBase
|
||||
{
|
||||
public Xbmc(ConfigProvider configProvider, DiskProvider diskProvider,
|
||||
BannerProvider bannerProvider, EpisodeService episodeService)
|
||||
BannerProvider bannerProvider, IEpisodeService episodeService)
|
||||
: base(configProvider, diskProvider, bannerProvider, episodeService)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -14,11 +14,11 @@ namespace NzbDrone.Core.Providers
|
|||
public class MisnamedProvider
|
||||
{
|
||||
private readonly MediaFileProvider _mediaFileProvider;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public MisnamedProvider(MediaFileProvider mediaFileProvider, EpisodeService episodeService)
|
||||
public MisnamedProvider(MediaFileProvider mediaFileProvider, IEpisodeService episodeService)
|
||||
{
|
||||
_mediaFileProvider = mediaFileProvider;
|
||||
_episodeService = episodeService;
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace NzbDrone.Core.Providers.Search
|
|||
private readonly ISeriesRepository _seriesRepository;
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public DailyEpisodeSearch(ISeriesService seriesService, EpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService,
|
||||
public DailyEpisodeSearch(ISeriesService seriesService, IEpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService,
|
||||
SceneMappingProvider sceneMappingProvider, AllowedDownloadSpecification allowedDownloadSpecification,
|
||||
SearchHistoryProvider searchHistoryProvider, ISeriesRepository seriesRepository)
|
||||
: base(seriesService, seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingProvider,
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace NzbDrone.Core.Providers.Search
|
|||
{
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public EpisodeSearch(ISeriesService seriesService, EpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService,
|
||||
public EpisodeSearch(ISeriesService seriesService, IEpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService,
|
||||
SceneMappingProvider sceneMappingProvider, AllowedDownloadSpecification allowedDownloadSpecification,
|
||||
SearchHistoryProvider searchHistoryProvider, ISeriesRepository seriesRepository)
|
||||
: base(seriesService,seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingProvider,
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace NzbDrone.Core.Providers.Search
|
|||
{
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public PartialSeasonSearch(ISeriesService seriesService, EpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService,
|
||||
public PartialSeasonSearch(ISeriesService seriesService, IEpisodeService episodeService, DownloadProvider downloadProvider, IIndexerService indexerService,
|
||||
SceneMappingProvider sceneMappingProvider, AllowedDownloadSpecification allowedDownloadSpecification,
|
||||
SearchHistoryProvider searchHistoryProvider,ISeriesRepository seriesRepository)
|
||||
: base(seriesService, seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingProvider,
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace NzbDrone.Core.Providers.Search
|
|||
{
|
||||
protected readonly ISeriesService _seriesService;
|
||||
private readonly ISeriesRepository _seriesRepository;
|
||||
protected readonly EpisodeService _episodeService;
|
||||
protected readonly IEpisodeService _episodeService;
|
||||
protected readonly DownloadProvider _downloadProvider;
|
||||
protected readonly IIndexerService _indexerService;
|
||||
protected readonly SceneMappingProvider _sceneMappingProvider;
|
||||
|
@ -25,7 +25,7 @@ namespace NzbDrone.Core.Providers.Search
|
|||
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
protected SearchBase(ISeriesService seriesService,ISeriesRepository seriesRepository, EpisodeService episodeService, DownloadProvider downloadProvider,
|
||||
protected SearchBase(ISeriesService seriesService,ISeriesRepository seriesRepository, IEpisodeService episodeService, DownloadProvider downloadProvider,
|
||||
IIndexerService indexerService, SceneMappingProvider sceneMappingProvider,
|
||||
AllowedDownloadSpecification allowedDownloadSpecification,
|
||||
SearchHistoryProvider searchHistoryProvider)
|
||||
|
|
|
@ -15,13 +15,13 @@ namespace NzbDrone.Core.Providers
|
|||
private readonly IDatabase _database;
|
||||
private readonly ISeriesService _seriesService;
|
||||
private readonly DownloadProvider _downloadProvider;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly ISeriesRepository _seriesRepository;
|
||||
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public SearchHistoryProvider(IDatabase database, ISeriesService seriesService,
|
||||
DownloadProvider downloadProvider, EpisodeService episodeService, ISeriesRepository seriesRepository)
|
||||
DownloadProvider downloadProvider, IEpisodeService episodeService, ISeriesRepository seriesRepository)
|
||||
{
|
||||
_database = database;
|
||||
_seriesService = seriesService;
|
||||
|
|
|
@ -17,13 +17,13 @@ namespace NzbDrone.Core.Providers
|
|||
public class SearchProvider
|
||||
{
|
||||
private readonly ISeriesService _seriesService;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly PartialSeasonSearch _partialSeasonSearch;
|
||||
private readonly ISeriesRepository _seriesRepository;
|
||||
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public SearchProvider(ISeriesService seriesService, EpisodeService episodeService,
|
||||
public SearchProvider(ISeriesService seriesService, IEpisodeService episodeService,
|
||||
PartialSeasonSearch partialSeasonSearch,ISeriesRepository seriesRepository)
|
||||
{
|
||||
_seriesService = seriesService;
|
||||
|
|
|
@ -13,12 +13,12 @@ namespace NzbDrone.Core.Providers
|
|||
{
|
||||
private readonly SceneMappingProvider _sceneMappingProvider;
|
||||
private readonly TvRageProvider _tvRageProvider;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public TvRageMappingProvider(SceneMappingProvider sceneMappingProvider,
|
||||
TvRageProvider tvRageProvider, EpisodeService episodeService)
|
||||
TvRageProvider tvRageProvider, IEpisodeService episodeService)
|
||||
{
|
||||
_sceneMappingProvider = sceneMappingProvider;
|
||||
_tvRageProvider = tvRageProvider;
|
||||
|
|
|
@ -11,13 +11,13 @@ namespace NzbDrone.Core.Providers
|
|||
public class XemProvider
|
||||
{
|
||||
private readonly ISeriesService _seriesService;
|
||||
private readonly EpisodeService _episodeService;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private readonly XemCommunicationProvider _xemCommunicationProvider;
|
||||
private readonly ISeriesRepository _seriesRepository;
|
||||
|
||||
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public XemProvider(ISeriesService seriesService, EpisodeService episodeService,
|
||||
public XemProvider(ISeriesService seriesService, IEpisodeService episodeService,
|
||||
XemCommunicationProvider xemCommunicationProvider,ISeriesRepository seriesRepository)
|
||||
{
|
||||
_seriesService = seriesService;
|
||||
|
|
Loading…
Reference in New Issue