fixed broken tests

This commit is contained in:
kay.one
2013-09-03 23:15:35 -07:00
parent 16c9232b12
commit c90a96c2e0
4 changed files with 25 additions and 2 deletions

View File

@@ -14,20 +14,24 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests
private Series _monitoredSeries;
private Series _unmonitoredSeries;
private PagingSpec<Episode> _pagingSpec;
[SetUp]
public void Setup()
{
_monitoredSeries = Builder<Series>.CreateNew()
.With(s => s.Id = 0)
.With(s => s.TvRageId = RandomNumber)
.With(s => s.Runtime = 30)
.With(s => s.Monitored = true)
.With(s => s.TitleSlug = "Title3")
.Build();
_unmonitoredSeries = Builder<Series>.CreateNew()
.With(s => s.Id = 0)
.With(s => s.TvdbId = RandomNumber)
.With(s => s.Runtime = 30)
.With(s => s.Monitored = false)
.With(s => s.TitleSlug = "Title2")
.Build();
_monitoredSeries.Id = Db.Insert(_monitoredSeries).Id;
@@ -44,6 +48,7 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests
var monitoredSeriesEpisodes = Builder<Episode>.CreateListOfSize(3)
.All()
.With(e => e.Id = 0)
.With(e => e.TvDbEpisodeId = RandomNumber)
.With(e => e.SeriesId = _monitoredSeries.Id)
.With(e => e.EpisodeFileId = 0)
.With(e => e.AirDateUtc = DateTime.Now.AddDays(-5))
@@ -57,6 +62,7 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests
var unmonitoredSeriesEpisodes = Builder<Episode>.CreateListOfSize(3)
.All()
.With(e => e.Id = 0)
.With(e => e.TvDbEpisodeId = RandomNumber)
.With(e => e.SeriesId = _unmonitoredSeries.Id)
.With(e => e.EpisodeFileId = 0)
.With(e => e.AirDateUtc = DateTime.Now.AddDays(-5))
@@ -67,6 +73,7 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeRepositoryTests
.With(e => e.SeasonNumber = 0)
.Build();
Db.InsertMany(monitoredSeriesEpisodes);
Db.InsertMany(unmonitoredSeriesEpisodes);
}