From 8ba42106c45e9a08cacb9d9d1b33403e5174fc68 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 22 May 2011 22:51:46 -0700 Subject: [PATCH] fixed broken tests --- NzbDrone.Core.Test/EpisodeProviderTest.cs | Bin 6675 -> 5812 bytes NzbDrone.Core.Test/MediaFileProviderTests.cs | 11 +++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/NzbDrone.Core.Test/EpisodeProviderTest.cs b/NzbDrone.Core.Test/EpisodeProviderTest.cs index 9ae4b9512beb94e03c3f5c97e16e37dc64bf7952..4ddd504c12a12b399f76809883c1a4acefe9985d 100644 GIT binary patch delta 16 XcmbPivPE}8gwSLW4uQ?bMSWNRGXe!+ delta 688 zcmaiy;Yz|#6vrVn#E@cGND!TZV2e3YqA#UjSs;`jOfZOu#m@A?+Lhfa;s@~|?hDit z7}SgP0@3E(bh)T~xv+bF=l?(ddp?Td`0Y*+N=BJL_}#bYP%Y_Tn-0VIaoHz~T6oJ% zK49%pAB`sEHR7SAJ>;@K*kXB3g*}q+4PlJ9-55K8NSJ$rzjRw@TB8`a#7R1-*yy_S zH@DHGdpi7siso9OgEEIlHVZ-}E(dDc40+ugF&&;Lb)aXmP(S)Zq__?VUmzQa>B_d4 z=2rJ-DMJO$2gI?^I}3rTap9rKv57ICeOj!42_y) z1)kJ}Jx#o(^E+`g48=!7hlz?%|B5)+u>88CphA453JS47jZLcMvf^`n_Yh@3#xhtc ipDy+!*q5=`Qs6+2uS0~%1=C`+W54l6CjZ`3u2bLsq1{9P diff --git a/NzbDrone.Core.Test/MediaFileProviderTests.cs b/NzbDrone.Core.Test/MediaFileProviderTests.cs index f308b886b..fd9a1b87e 100644 --- a/NzbDrone.Core.Test/MediaFileProviderTests.cs +++ b/NzbDrone.Core.Test/MediaFileProviderTests.cs @@ -324,12 +324,15 @@ namespace NzbDrone.Core.Test public void scan_media_job_should_not_scan_new_series() { var mocker = new AutoMoqer(); + IQueryable fakeSeries = Builder.CreateListOfSize(2) + .WhereTheFirst(1).Has(c => c.Episodes = new List()) + .AndTheNext(1).Has(c => c.Episodes = Builder.CreateListOfSize(10).Build()) + .Build().AsQueryable(); mocker.GetMock() - .Setup(c => c.GetAllSeries()) - .Returns(Builder.CreateListOfSize(2) - .WhereTheFirst(1).Has(c => c.LastInfoSync = DateTime.Now).Build().AsQueryable()); + .Setup(c => c.GetAllSeries()).Returns(fakeSeries); + mocker.GetMock(MockBehavior.Strict) - .Setup(c => c.Scan(It.Is(s => s.LastInfoSync != null))).Returns(new List()).Verifiable(); + .Setup(c => c.Scan(fakeSeries.ToList()[1])).Returns(new List()).Verifiable(); mocker.Resolve().Start(new ProgressNotification("test"), 0);