moved series/season/episodes to object db.

This commit is contained in:
Keivan Beigi 2013-02-19 18:05:15 -08:00
commit b5644bf660
93 changed files with 1025 additions and 1338 deletions

View file

@ -152,14 +152,14 @@ namespace NzbDrone.Core.Test.JobTests
.Setup(p => p.GetSeriesFiles(seriesId))
.Returns(new List<EpisodeFile>());
Mocker.GetMock<EpisodeProvider>()
.Setup(p => p.GetSeasons(seriesId))
Mocker.GetMock<ISeasonRepository>()
.Setup(p => p.GetSeasonNumbers(seriesId))
.Returns(new List<int> { 0, 1, 2, 3, 4 });
Mocker.Resolve<ImportNewSeriesJob>().AutoIgnoreSeasons(seriesId);
Mocker.GetMock<SeasonProvider>().Verify(p => p.SetIgnore(seriesId, It.IsAny<int>(), It.IsAny<Boolean>()), Times.Never());
Mocker.GetMock<ISeasonService>().Verify(p => p.SetIgnore(seriesId, It.IsAny<int>(), It.IsAny<Boolean>()), Times.Never());
}
[Test]
@ -180,13 +180,13 @@ namespace NzbDrone.Core.Test.JobTests
.Setup(p => p.GetSeriesFiles(seriesId))
.Returns(episodesFiles);
Mocker.GetMock<EpisodeProvider>()
.Setup(p => p.GetSeasons(seriesId))
Mocker.GetMock<ISeasonRepository>()
.Setup(p => p.GetSeasonNumbers(seriesId))
.Returns(new List<int> { 0, 1, 2 });
Mocker.Resolve<ImportNewSeriesJob>().AutoIgnoreSeasons(seriesId);
Mocker.GetMock<SeasonProvider>().Verify(p => p.SetIgnore(seriesId, 2, It.IsAny<Boolean>()), Times.Never());
Mocker.GetMock<ISeasonService>().Verify(p => p.SetIgnore(seriesId, 2, It.IsAny<Boolean>()), Times.Never());
}
[Test]
@ -206,15 +206,15 @@ namespace NzbDrone.Core.Test.JobTests
.Setup(p => p.GetSeriesFiles(seriesId))
.Returns(episodesFiles);
Mocker.GetMock<EpisodeProvider>()
.Setup(p => p.GetSeasons(seriesId))
Mocker.GetMock<ISeasonRepository>()
.Setup(p => p.GetSeasonNumbers(seriesId))
.Returns(new List<int> { 0, 1, 2 });
Mocker.Resolve<ImportNewSeriesJob>().AutoIgnoreSeasons(seriesId);
Mocker.GetMock<SeasonProvider>().Verify(p => p.SetIgnore(seriesId, 0, true), Times.Once());
Mocker.GetMock<SeasonProvider>().Verify(p => p.SetIgnore(seriesId, 1, true), Times.Never());
Mocker.GetMock<SeasonProvider>().Verify(p => p.SetIgnore(seriesId, 2, It.IsAny<Boolean>()), Times.Never());
Mocker.GetMock<ISeasonService>().Verify(p => p.SetIgnore(seriesId, 0, true), Times.Once());
Mocker.GetMock<ISeasonService>().Verify(p => p.SetIgnore(seriesId, 1, true), Times.Never());
Mocker.GetMock<ISeasonService>().Verify(p => p.SetIgnore(seriesId, 2, It.IsAny<Boolean>()), Times.Never());
}
}