mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-28 02:27:13 +00:00
Fixed broken Series with Episode Count test.
This commit is contained in:
parent
67299f0d97
commit
c322dd9e7a
1 changed files with 13 additions and 4 deletions
|
@ -272,7 +272,12 @@ public void Get_Series_With_Count_AllDownloaded()
|
||||||
|
|
||||||
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
|
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
|
||||||
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
|
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
|
||||||
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10).WhereAll().Have(e => e.SeriesId = fakeSeries.SeriesId).Have(e => e.Ignored = false).Build();
|
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
|
||||||
|
.WhereAll()
|
||||||
|
.Have(e => e.SeriesId = fakeSeries.SeriesId)
|
||||||
|
.Have(e => e.Ignored = false)
|
||||||
|
.Have(e => e.AirDate = DateTime.Today.AddDays(-1))
|
||||||
|
.Build();
|
||||||
|
|
||||||
db.Insert(fakeSeries);
|
db.Insert(fakeSeries);
|
||||||
db.Insert(fakeQuality);
|
db.Insert(fakeQuality);
|
||||||
|
@ -298,9 +303,13 @@ public void Get_Series_With_Count_Half_Ignored()
|
||||||
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
|
var fakeQuality = Builder<QualityProfile>.CreateNew().Build();
|
||||||
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
|
var fakeSeries = Builder<Series>.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build();
|
||||||
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
|
var fakeEpisodes = Builder<Episode>.CreateListOfSize(10)
|
||||||
.WhereAll().Have(e => e.SeriesId = fakeSeries.SeriesId)
|
.WhereAll()
|
||||||
.WhereTheFirst(5).Have(e => e.Ignored = false)
|
.Have(e => e.SeriesId = fakeSeries.SeriesId)
|
||||||
.WhereTheLast(5).Have(e => e.Ignored = true)
|
.Have(e => e.AirDate = DateTime.Today.AddDays(-1))
|
||||||
|
.WhereTheFirst(5)
|
||||||
|
.Have(e => e.Ignored = false)
|
||||||
|
.WhereTheLast(5)
|
||||||
|
.Have(e => e.Ignored = true)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
db.Insert(fakeSeries);
|
db.Insert(fakeSeries);
|
||||||
|
|
Loading…
Reference in a new issue