From f52620db702b39a7683d6dc4b7aa767788235a50 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sat, 22 Oct 2011 22:39:14 -0700 Subject: [PATCH] Replaced deprecated NBuilder calls. --- NzbDrone.Core.Test/Framework/TestBase.cs | 2 +- .../JobTests/BannerDownloadJobTest.cs | 2 +- .../JobTests/DiskScanJobTest.cs | 12 +-- .../JobTests/ImportNewSeriesJobTest.cs | 8 +- .../ProviderTests/DownloadProviderTest.cs | 6 +- .../ProviderTests/EpisodeProviderTest.cs | 8 +- .../ProviderTests/HistoryProviderTest.cs | 4 +- .../ProviderTests/JobProviderTest.cs | 5 +- .../ProviderTests/MisnamedProviderTest.cs | 100 +++++++++--------- .../SearchProviderTest_Episode.cs | 4 +- .../SearchProviderTest_PartialSeason.cs | 8 +- .../SearchProviderTest_Season.cs | 24 ++--- .../ProviderTests/SeriesProviderTest.cs | 22 ++-- .../UpcomingEpisodesProviderTest.cs | 22 ++-- 14 files changed, 114 insertions(+), 113 deletions(-) diff --git a/NzbDrone.Core.Test/Framework/TestBase.cs b/NzbDrone.Core.Test/Framework/TestBase.cs index eca9b1288..1cb45dfb8 100644 --- a/NzbDrone.Core.Test/Framework/TestBase.cs +++ b/NzbDrone.Core.Test/Framework/TestBase.cs @@ -9,7 +9,7 @@ namespace NzbDrone.Core.Test.Framework { [SetUp] - public void Setup() + public virtual void Setup() { ExceptionVerification.Reset(); if (Directory.Exists(TempFolder)) diff --git a/NzbDrone.Core.Test/JobTests/BannerDownloadJobTest.cs b/NzbDrone.Core.Test/JobTests/BannerDownloadJobTest.cs index 301ea3ad5..4724f626c 100644 --- a/NzbDrone.Core.Test/JobTests/BannerDownloadJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/BannerDownloadJobTest.cs @@ -54,7 +54,7 @@ namespace NzbDrone.Core.Test.JobTests { //Setup var fakeSeries = Builder.CreateListOfSize(10) - .WhereRandom(2) + .Random(2) .With(s => s.BannerUrl = null) .Build(); diff --git a/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs b/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs index 2f840d651..861f16c6c 100644 --- a/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs @@ -49,8 +49,8 @@ namespace NzbDrone.Core.Test.JobTests public void job_with_no_target_should_scan_all_series() { var series = Builder.CreateListOfSize(2) - .TheFirst(1).Has(s => s.SeriesId = 12) - .AndTheNext(1).Has(s => s.SeriesId = 15) + .TheFirst(1).With(s => s.SeriesId = 12) + .TheNext(1).With(s => s.SeriesId = 15) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -77,8 +77,8 @@ namespace NzbDrone.Core.Test.JobTests public void failed_scan_should_not_terminated_job() { var series = Builder.CreateListOfSize(2) - .TheFirst(1).Has(s => s.SeriesId = 12) - .AndTheNext(1).Has(s => s.SeriesId = 15) + .TheFirst(1).With(s => s.SeriesId = 12) + .TheNext(1).With(s => s.SeriesId = 15) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -106,8 +106,8 @@ namespace NzbDrone.Core.Test.JobTests public void job_with_no_target_should_scan_series_with_episodes() { var series = Builder.CreateListOfSize(2) - .TheFirst(1).Has(s => s.SeriesId = 12) - .AndTheNext(1).Has(s => s.SeriesId = 15) + .TheFirst(1).With(s => s.SeriesId = 12) + .TheNext(1).With(s => s.SeriesId = 15) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); diff --git a/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs b/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs index 72ba0f55d..6c67b1c2d 100644 --- a/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs @@ -23,8 +23,8 @@ namespace NzbDrone.Core.Test.JobTests { var series = Builder.CreateListOfSize(2) .All().With(s => s.LastInfoSync = null) - .TheFirst(1).Has(s => s.SeriesId = 12) - .AndTheNext(1).Has(s => s.SeriesId = 15) + .TheFirst(1).With(s => s.SeriesId = 12) + .TheNext(1).With(s => s.SeriesId = 15) .Build(); var notification = new ProgressNotification("Test"); @@ -88,8 +88,8 @@ namespace NzbDrone.Core.Test.JobTests { var series = Builder.CreateListOfSize(2) .All().With(s => s.LastInfoSync = null) - .TheFirst(1).Has(s => s.SeriesId = 12) - .AndTheNext(1).Has(s => s.SeriesId = 15) + .TheFirst(1).With(s => s.SeriesId = 12) + .TheNext(1).With(s => s.SeriesId = 15) .Build(); var notification = new ProgressNotification("Test"); diff --git a/NzbDrone.Core.Test/ProviderTests/DownloadProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/DownloadProviderTest.cs index 14e5b2b5c..7b8033a11 100644 --- a/NzbDrone.Core.Test/ProviderTests/DownloadProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/DownloadProviderTest.cs @@ -25,9 +25,9 @@ namespace NzbDrone.Core.Test.ProviderTests .Build(); var episodes = Builder.CreateListOfSize(2) - .TheFirst(1).Has(s => s.EpisodeId = 12) - .AndTheNext(1).Has(s => s.EpisodeId = 99) - .All().Has(s => s.SeriesId = 5) + .TheFirst(1).With(s => s.EpisodeId = 12) + .TheNext(1).With(s => s.EpisodeId = 99) + .All().With(s => s.SeriesId = 5) .Build(); diff --git a/NzbDrone.Core.Test/ProviderTests/EpisodeProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/EpisodeProviderTest.cs index f6b02895c..05781e5e2 100644 --- a/NzbDrone.Core.Test/ProviderTests/EpisodeProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/EpisodeProviderTest.cs @@ -338,8 +338,8 @@ namespace NzbDrone.Core.Test.ProviderTests All() .With(l => l.Language = new TvdbLanguage(0, "eng", "a")) .TheFirst(1) - .Has(e => e.EpisodeNumber = 0) - .Has(e => e.SeasonNumber = 15) + .With(e => e.EpisodeNumber = 0) + .With(e => e.SeasonNumber = 15) .Build()) ).With(c => c.Id = seriesId).Build(); @@ -1183,7 +1183,7 @@ namespace NzbDrone.Core.Test.ProviderTests .With(c => c.Ignored = true) .TheFirst(2) .With(c => c.EpisodeFileId = 0) - .WhereSection(1, 2) + .Section(1, 2) .With(c => c.Ignored = false) .Build().ToList(); @@ -1230,7 +1230,7 @@ namespace NzbDrone.Core.Test.ProviderTests .With(c => c.Ignored = true) .TheFirst(2) .With(c => c.EpisodeFileId = 0) - .WhereSection(1, 2) + .Section(1, 2) .With(c => c.Ignored = false) .Build().ToList(); diff --git a/NzbDrone.Core.Test/ProviderTests/HistoryProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/HistoryProviderTest.cs index 47f8272c8..8f4ef6700 100644 --- a/NzbDrone.Core.Test/ProviderTests/HistoryProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/HistoryProviderTest.cs @@ -44,7 +44,7 @@ namespace NzbDrone.Core.Test.ProviderTests var episodes = Builder.CreateListOfSize(10).Build(); - var historyItems = Builder.CreateListOfSize(10).TheFirst(5).With(h => h.SeriesId = seriesOne.SeriesId).WhereTheLast(5).With(h => h.SeriesId = seriesTwo.SeriesId).Build(); + var historyItems = Builder.CreateListOfSize(10).TheFirst(5).With(h => h.SeriesId = seriesOne.SeriesId).TheLast(5).With(h => h.SeriesId = seriesTwo.SeriesId).Build(); var mocker = new AutoMoqer(); var db = MockLib.GetEmptyDatabase(); @@ -95,7 +95,7 @@ namespace NzbDrone.Core.Test.ProviderTests //Setup var historyItem = Builder.CreateListOfSize(20) .TheFirst(10).With(c => c.Date = DateTime.Now) - .AndTheNext(10).With(c => c.Date = DateTime.Now.AddDays(-31)) + .TheNext(10).With(c => c.Date = DateTime.Now.AddDays(-31)) .Build(); var mocker = new AutoMoqer(); diff --git a/NzbDrone.Core.Test/ProviderTests/JobProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/JobProviderTest.cs index 348de3750..c45862583 100644 --- a/NzbDrone.Core.Test/ProviderTests/JobProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/JobProviderTest.cs @@ -18,8 +18,9 @@ namespace NzbDrone.Core.Test.ProviderTests public class JobProviderTest : TestBase { [TestFixtureSetUp] - public void Setup() + public override void Setup() { + base.Setup(); JobProvider.Queue.Clear(); } @@ -415,7 +416,7 @@ namespace NzbDrone.Core.Test.ProviderTests TargetId = 12, SecondaryTargetId = 0 }; - + //Act var jobProvider = mocker.Resolve(); jobProvider.Initialize(); diff --git a/NzbDrone.Core.Test/ProviderTests/MisnamedProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/MisnamedProviderTest.cs index eafc762d5..f90a9e0d1 100644 --- a/NzbDrone.Core.Test/ProviderTests/MisnamedProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/MisnamedProviderTest.cs @@ -23,22 +23,22 @@ namespace NzbDrone.Core.Test.ProviderTests var episodeFiles = Builder.CreateListOfSize(2) .TheFirst(1) - .Has(f => f.EpisodeFileId = 1) - .Has(f => f.Path = @"C:\Test\Title1.avi") - .AndTheNext(1) - .Has(f => f.EpisodeFileId = 2) - .Has(f => f.Path = @"C:\Test\Title2.avi") + .With(f => f.EpisodeFileId = 1) + .With(f => f.Path = @"C:\Test\Title1.avi") + .TheNext(1) + .With(f => f.EpisodeFileId = 2) + .With(f => f.Path = @"C:\Test\Title2.avi") .Build(); var episodes = Builder.CreateListOfSize(2) .All() .With(e => e.Series = series) .TheFirst(1) - .Has(e => e.EpisodeFileId = 1) - .Has(e => e.EpisodeFile = episodeFiles[0]) - .AndTheNext(1) - .Has(e => e.EpisodeFileId = 2) - .Has(e => e.EpisodeFile = episodeFiles[1]) + .With(e => e.EpisodeFileId = 1) + .With(e => e.EpisodeFile = episodeFiles[0]) + .TheNext(1) + .With(e => e.EpisodeFileId = 2) + .With(e => e.EpisodeFile = episodeFiles[1]) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -72,22 +72,22 @@ namespace NzbDrone.Core.Test.ProviderTests var episodeFiles = Builder.CreateListOfSize(2) .TheFirst(1) - .Has(f => f.EpisodeFileId = 1) - .Has(f => f.Path = @"C:\Test\Title1.avi") - .AndTheNext(1) - .Has(f => f.EpisodeFileId = 2) - .Has(f => f.Path = @"C:\Test\Title2.avi") + .With(f => f.EpisodeFileId = 1) + .With(f => f.Path = @"C:\Test\Title1.avi") + .TheNext(1) + .With(f => f.EpisodeFileId = 2) + .With(f => f.Path = @"C:\Test\Title2.avi") .Build(); var episodes = Builder.CreateListOfSize(2) .All() .With(e => e.Series = series) .TheFirst(1) - .Has(e => e.EpisodeFileId = 1) - .Has(e => e.EpisodeFile = episodeFiles[0]) - .AndTheNext(1) - .Has(e => e.EpisodeFileId = 2) - .Has(e => e.EpisodeFile = episodeFiles[1]) + .With(e => e.EpisodeFileId = 1) + .With(e => e.EpisodeFile = episodeFiles[0]) + .TheNext(1) + .With(e => e.EpisodeFileId = 2) + .With(e => e.EpisodeFile = episodeFiles[1]) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -121,22 +121,22 @@ namespace NzbDrone.Core.Test.ProviderTests var episodeFiles = Builder.CreateListOfSize(2) .TheFirst(1) - .Has(f => f.EpisodeFileId = 1) - .Has(f => f.Path = @"C:\Test\Title1.avi") - .AndTheNext(1) - .Has(f => f.EpisodeFileId = 2) - .Has(f => f.Path = @"C:\Test\Title2.avi") + .With(f => f.EpisodeFileId = 1) + .With(f => f.Path = @"C:\Test\Title1.avi") + .TheNext(1) + .With(f => f.EpisodeFileId = 2) + .With(f => f.Path = @"C:\Test\Title2.avi") .Build(); var episodes = Builder.CreateListOfSize(2) .All() .With(e => e.Series = series) .TheFirst(1) - .Has(e => e.EpisodeFileId = 1) - .Has(e => e.EpisodeFile = episodeFiles[0]) - .AndTheNext(1) - .Has(e => e.EpisodeFileId = 2) - .Has(e => e.EpisodeFile = episodeFiles[1]) + .With(e => e.EpisodeFileId = 1) + .With(e => e.EpisodeFile = episodeFiles[0]) + .TheNext(1) + .With(e => e.EpisodeFileId = 2) + .With(e => e.EpisodeFile = episodeFiles[1]) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -172,22 +172,22 @@ namespace NzbDrone.Core.Test.ProviderTests var episodeFiles = Builder.CreateListOfSize(2) .TheFirst(1) - .Has(f => f.EpisodeFileId = 1) - .Has(f => f.Path = @"C:\Test\Title1.avi") - .AndTheNext(1) - .Has(f => f.EpisodeFileId = 2) - .Has(f => f.Path = @"C:\Test\Title2.avi") + .With(f => f.EpisodeFileId = 1) + .With(f => f.Path = @"C:\Test\Title1.avi") + .TheNext(1) + .With(f => f.EpisodeFileId = 2) + .With(f => f.Path = @"C:\Test\Title2.avi") .Build(); var episodes = Builder.CreateListOfSize(3) .All() .With(e => e.Series = series) .TheFirst(2) - .Has(e => e.EpisodeFileId = 1) - .Has(e => e.EpisodeFile = episodeFiles[0]) - .AndTheNext(1) - .Has(e => e.EpisodeFileId = 2) - .Has(e => e.EpisodeFile = episodeFiles[1]) + .With(e => e.EpisodeFileId = 1) + .With(e => e.EpisodeFile = episodeFiles[0]) + .TheNext(1) + .With(e => e.EpisodeFileId = 2) + .With(e => e.EpisodeFile = episodeFiles[1]) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -223,22 +223,22 @@ namespace NzbDrone.Core.Test.ProviderTests var episodeFiles = Builder.CreateListOfSize(2) .TheFirst(1) - .Has(f => f.EpisodeFileId = 1) - .Has(f => f.Path = @"C:\Test\Title1.avi") - .AndTheNext(1) - .Has(f => f.EpisodeFileId = 2) - .Has(f => f.Path = @"C:\Test\Title2.avi") + .With(f => f.EpisodeFileId = 1) + .With(f => f.Path = @"C:\Test\Title1.avi") + .TheNext(1) + .With(f => f.EpisodeFileId = 2) + .With(f => f.Path = @"C:\Test\Title2.avi") .Build(); var episodes = Builder.CreateListOfSize(3) .All() .With(e => e.Series = series) .TheFirst(2) - .Has(e => e.EpisodeFileId = 1) - .Has(e => e.EpisodeFile = episodeFiles[0]) - .AndTheNext(1) - .Has(e => e.EpisodeFileId = 2) - .Has(e => e.EpisodeFile = episodeFiles[1]) + .With(e => e.EpisodeFileId = 1) + .With(e => e.EpisodeFile = episodeFiles[0]) + .TheNext(1) + .With(e => e.EpisodeFileId = 2) + .With(e => e.EpisodeFile = episodeFiles[1]) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); diff --git a/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_Episode.cs b/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_Episode.cs index 127de307d..8200af162 100644 --- a/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_Episode.cs +++ b/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_Episode.cs @@ -55,7 +55,7 @@ namespace NzbDrone.Core.Test.ProviderTests { var parseResults = Builder.CreateListOfSize(10) .All().With(c => c.Quality = new Quality(QualityTypes.DVD, true)) - .WhereRandom(1).Has(c => c.Quality = new Quality(QualityTypes.Bluray1080p, true)) + .Random(1).With(c => c.Quality = new Quality(QualityTypes.Bluray1080p, true)) .Build(); var episode = Builder.CreateNew().Build(); @@ -91,7 +91,7 @@ namespace NzbDrone.Core.Test.ProviderTests { var parseResults = Builder.CreateListOfSize(20) .All().With(c => c.Quality = new Quality(QualityTypes.DVD, false)) - .WhereRandom(1).Has(c => c.Quality = new Quality(QualityTypes.DVD, true)) + .Random(1).With(c => c.Quality = new Quality(QualityTypes.DVD, true)) .Build(); parseResults.Where(c => c.Quality.Proper).Should().HaveCount(1); diff --git a/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_PartialSeason.cs b/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_PartialSeason.cs index 58021367c..39bc18407 100644 --- a/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_PartialSeason.cs +++ b/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_PartialSeason.cs @@ -183,10 +183,10 @@ namespace NzbDrone.Core.Test.ProviderTests var parseResults = Builder.CreateListOfSize(4) .TheFirst(1) - .Has(p => p.CleanTitle = "title") - .Has(p => p.SeasonNumber = 1) - .Has(p => p.FullSeason = true) - .Has(p => p.EpisodeNumbers = null) + .With(p => p.CleanTitle = "title") + .With(p => p.SeasonNumber = 1) + .With(p => p.FullSeason = true) + .With(p => p.EpisodeNumbers = null) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); diff --git a/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_Season.cs b/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_Season.cs index 2fdcbb302..f081b8abf 100644 --- a/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_Season.cs +++ b/NzbDrone.Core.Test/ProviderTests/SearchProviderTest_Season.cs @@ -37,10 +37,10 @@ namespace NzbDrone.Core.Test.ProviderTests var parseResults = Builder.CreateListOfSize(4) .TheFirst(1) - .Has(p => p.CleanTitle = "title") - .Has(p => p.SeasonNumber = 1) - .Has(p => p.FullSeason = true) - .Has(p => p.EpisodeNumbers = null) + .With(p => p.CleanTitle = "title") + .With(p => p.SeasonNumber = 1) + .With(p => p.FullSeason = true) + .With(p => p.EpisodeNumbers = null) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -149,10 +149,10 @@ namespace NzbDrone.Core.Test.ProviderTests var parseResults = Builder.CreateListOfSize(4) .TheFirst(1) - .Has(p => p.CleanTitle = "title") - .Has(p => p.SeasonNumber = 1) - .Has(p => p.FullSeason = true) - .Has(p => p.EpisodeNumbers = null) + .With(p => p.CleanTitle = "title") + .With(p => p.SeasonNumber = 1) + .With(p => p.FullSeason = true) + .With(p => p.EpisodeNumbers = null) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); @@ -183,10 +183,10 @@ namespace NzbDrone.Core.Test.ProviderTests var parseResults = Builder.CreateListOfSize(4) .TheFirst(1) - .Has(p => p.CleanTitle = "title") - .Has(p => p.SeasonNumber = 1) - .Has(p => p.FullSeason = true) - .Has(p => p.EpisodeNumbers = null) + .With(p => p.CleanTitle = "title") + .With(p => p.SeasonNumber = 1) + .With(p => p.FullSeason = true) + .With(p => p.EpisodeNumbers = null) .Build(); var mocker = new AutoMoqer(MockBehavior.Strict); diff --git a/NzbDrone.Core.Test/ProviderTests/SeriesProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/SeriesProviderTest.cs index e8c715a4f..8e2d7d548 100644 --- a/NzbDrone.Core.Test/ProviderTests/SeriesProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/SeriesProviderTest.cs @@ -220,7 +220,7 @@ namespace NzbDrone.Core.Test.ProviderTests .With(e => e.AirDate = DateTime.Today) .TheFirst(5) .With(e => e.EpisodeFileId = 0) - .WhereTheLast(2) + .TheLast(2) .With(e => e.AirDate = DateTime.Today.AddDays(1)) .Build(); @@ -247,7 +247,7 @@ namespace NzbDrone.Core.Test.ProviderTests var fakeQuality = Builder.CreateNew().Build(); var fakeSeries = Builder.CreateNew().With(e => e.QualityProfileId = fakeQuality.QualityProfileId).Build(); - var fakeEpisodes = Builder.CreateListOfSize(10).All().With(e => e.SeriesId = fakeSeries.SeriesId).With(e => e.Ignored = true).WhereRandom(5).With(e => e.EpisodeFileId = 0).Build(); + var fakeEpisodes = Builder.CreateListOfSize(10).All().With(e => e.SeriesId = fakeSeries.SeriesId).With(e => e.Ignored = true).Random(5).With(e => e.EpisodeFileId = 0).Build(); db.Insert(fakeSeries); db.Insert(fakeQuality); @@ -308,7 +308,7 @@ namespace NzbDrone.Core.Test.ProviderTests .With(e => e.AirDate = DateTime.Today.AddDays(-1)) .TheFirst(5) .With(e => e.Ignored = false) - .WhereTheLast(5) + .TheLast(5) .With(e => e.Ignored = true) .Build(); @@ -638,8 +638,8 @@ namespace NzbDrone.Core.Test.ProviderTests var fakeQuality = Builder.CreateNew().Build(); var fakeSeries = Builder.CreateListOfSize(10) - .WhereAll() - .Have(e => e.QualityProfileId = fakeQuality.QualityProfileId) + .All() + .With(e => e.QualityProfileId = fakeQuality.QualityProfileId) .Build(); db.InsertMany(fakeSeries); @@ -661,8 +661,8 @@ namespace NzbDrone.Core.Test.ProviderTests var fakeQuality = Builder.CreateNew().Build(); var fakeSeries = Builder.CreateListOfSize(10) - .WhereAll() - .Have(e => e.QualityProfileId = fakeQuality.QualityProfileId) + .All() + .With(e => e.QualityProfileId = fakeQuality.QualityProfileId) .Build(); db.InsertMany(fakeSeries); @@ -684,8 +684,8 @@ namespace NzbDrone.Core.Test.ProviderTests var fakeQuality = Builder.CreateNew().Build(); var fakeSeries = Builder.CreateListOfSize(10) - .WhereAll() - .Have(e => e.QualityProfileId = fakeQuality.QualityProfileId) + .All() + .With(e => e.QualityProfileId = fakeQuality.QualityProfileId) .Build(); db.InsertMany(fakeSeries); @@ -707,8 +707,8 @@ namespace NzbDrone.Core.Test.ProviderTests var fakeQuality = Builder.CreateNew().Build(); var fakeSeries = Builder.CreateListOfSize(10) - .WhereAll() - .Have(e => e.QualityProfileId = fakeQuality.QualityProfileId) + .All() + .With(e => e.QualityProfileId = fakeQuality.QualityProfileId) .Build(); db.InsertMany(fakeSeries); diff --git a/NzbDrone.Core.Test/ProviderTests/UpcomingEpisodesProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/UpcomingEpisodesProviderTest.cs index f8f3aac5e..4a0262eba 100644 --- a/NzbDrone.Core.Test/ProviderTests/UpcomingEpisodesProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/UpcomingEpisodesProviderTest.cs @@ -28,17 +28,17 @@ namespace NzbDrone.Core.Test.ProviderTests .With(e => e.SeriesId = 1) .With(e => e.Ignored = false) .TheFirst(1) - .Has(e => e.AirDate = DateTime.Today.AddDays(-1)) - .AndTheNext(1) - .Has(e => e.AirDate = DateTime.Today) - .AndTheNext(1) - .Has(e => e.AirDate = DateTime.Today.AddDays(1)) - .AndTheNext(1) - .Has(e => e.AirDate = DateTime.Today.AddDays(2)) - .AndTheNext(1) - .Has(e => e.AirDate = DateTime.Today.AddDays(7)) - .AndTheNext(1) - .Has(e => e.AirDate = DateTime.Today.AddDays(9)) + .With(e => e.AirDate = DateTime.Today.AddDays(-1)) + .TheNext(1) + .With(e => e.AirDate = DateTime.Today) + .TheNext(1) + .With(e => e.AirDate = DateTime.Today.AddDays(1)) + .TheNext(1) + .With(e => e.AirDate = DateTime.Today.AddDays(2)) + .TheNext(1) + .With(e => e.AirDate = DateTime.Today.AddDays(7)) + .TheNext(1) + .With(e => e.AirDate = DateTime.Today.AddDays(9)) .Build(); series = Builder.CreateNew().With(s => s.SeriesId = 1).Build();