From a98d792c0da49b7ed2e144fdfe4031ac15a34d45 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 24 Feb 2013 11:39:31 -0800 Subject: [PATCH] fixed some broken tests. --- ...AllowedReleaseGroupSpecificationFixture.cs | 8 ++++---- .../RetentionSpecificationFixture.cs | 8 ++++---- .../IndexerTests/IndexerFixture.cs | 16 ++++++++-------- .../JobTests/BacklogSearchJobTest.cs | 2 +- .../JobTests/PostDownloadScanJobFixture.cs | 8 ++++---- .../JobTests/RecentBacklogSearchJobTest.cs | 2 +- NzbDrone.Core.Test/JobTests/RssSyncJobTest.cs | 2 +- .../DiskScanProviderTests/CleanUpFixture.cs | 2 +- .../BlackholeProviderFixture.cs | 2 +- .../NzbgetProviderTests/DownloadNzbFixture.cs | 2 +- .../NzbgetProviderTests/QueueFixture.cs | 2 +- .../PneumaticProviderFixture.cs | 4 ++-- .../SabProviderTests/QueueFixture.cs | 2 +- .../SabProviderTests/SabProviderFixture.cs | 10 +++++----- .../DownloadProviderFixture.cs | 4 ++-- .../ProviderTests/MediaFileProviderTest.cs | 2 +- .../Metadata/Xbmc_ForEpisodeFile_Fixture.cs | 2 +- .../Metadata/Xbmc_ForSeries_Fixture.cs | 2 +- .../ProviderTests/PlexProviderTest.cs | 8 ++++---- .../RecycleBinProviderTests/CleanupFixture.cs | 4 ++-- .../DeleteDirectoryFixture.cs | 4 ++-- .../DeleteFileFixture.cs | 4 ++-- .../RecycleBinProviderTests/EmptyFixture.cs | 4 ++-- .../ReferenceDataProviderTest.cs | 2 +- .../ProviderTests/SceneMappingProviderTest.cs | 2 +- .../GetAvilableUpdateFixture.cs | 2 +- .../ProviderTests/XbmcProviderTest.cs | 4 ++-- .../EpisodeProviderTest.cs | 2 +- .../TvTests/SeriesProviderTest.cs | Bin 3427 -> 3428 bytes NzbDrone.Test.Common/TestBase.cs | 4 ++-- 30 files changed, 60 insertions(+), 60 deletions(-) diff --git a/NzbDrone.Core.Test/DecisionEngineTests/AllowedReleaseGroupSpecificationFixture.cs b/NzbDrone.Core.Test/DecisionEngineTests/AllowedReleaseGroupSpecificationFixture.cs index 7479c2f3e..854f89a23 100644 --- a/NzbDrone.Core.Test/DecisionEngineTests/AllowedReleaseGroupSpecificationFixture.cs +++ b/NzbDrone.Core.Test/DecisionEngineTests/AllowedReleaseGroupSpecificationFixture.cs @@ -43,28 +43,28 @@ namespace NzbDrone.Core.Test.DecisionEngineTests [Test] public void should_be_true_when_allowedReleaseGroups_is_empty() { - Mocker.GetMock().SetupGet(s => s.AllowedReleaseGroups).Returns(String.Empty); + Mocker.GetMock().SetupGet(s => s.AllowedReleaseGroups).Returns(String.Empty); Mocker.Resolve().IsSatisfiedBy(parseResult).Should().BeTrue(); } [Test] public void should_be_true_when_allowedReleaseGroups_is_nzbs_releaseGroup() { - Mocker.GetMock().SetupGet(s => s.AllowedReleaseGroups).Returns("2HD"); + Mocker.GetMock().SetupGet(s => s.AllowedReleaseGroups).Returns("2HD"); Mocker.Resolve().IsSatisfiedBy(parseResult).Should().BeTrue(); } [Test] public void should_be_true_when_allowedReleaseGroups_contains_nzbs_releaseGroup() { - Mocker.GetMock().SetupGet(s => s.AllowedReleaseGroups).Returns("2HD, LOL"); + Mocker.GetMock().SetupGet(s => s.AllowedReleaseGroups).Returns("2HD, LOL"); Mocker.Resolve().IsSatisfiedBy(parseResult).Should().BeTrue(); } [Test] public void should_be_false_when_allowedReleaseGroups_does_not_contain_nzbs_releaseGroup() { - Mocker.GetMock().SetupGet(s => s.AllowedReleaseGroups).Returns("LOL,DTD"); + Mocker.GetMock().SetupGet(s => s.AllowedReleaseGroups).Returns("LOL,DTD"); Mocker.Resolve().IsSatisfiedBy(parseResult).Should().BeFalse(); } } diff --git a/NzbDrone.Core.Test/DecisionEngineTests/RetentionSpecificationFixture.cs b/NzbDrone.Core.Test/DecisionEngineTests/RetentionSpecificationFixture.cs index 51cf23c0e..f30b36f6b 100644 --- a/NzbDrone.Core.Test/DecisionEngineTests/RetentionSpecificationFixture.cs +++ b/NzbDrone.Core.Test/DecisionEngineTests/RetentionSpecificationFixture.cs @@ -38,22 +38,22 @@ namespace NzbDrone.Core.Test.DecisionEngineTests private void WithUnlimitedRetention() { - Mocker.GetMock().SetupGet(c => c.Retention).Returns(0); + Mocker.GetMock().SetupGet(c => c.Retention).Returns(0); } private void WithLongRetention() { - Mocker.GetMock().SetupGet(c => c.Retention).Returns(1000); + Mocker.GetMock().SetupGet(c => c.Retention).Returns(1000); } private void WithShortRetention() { - Mocker.GetMock().SetupGet(c => c.Retention).Returns(10); + Mocker.GetMock().SetupGet(c => c.Retention).Returns(10); } private void WithEqualRetention() { - Mocker.GetMock().SetupGet(c => c.Retention).Returns(100); + Mocker.GetMock().SetupGet(c => c.Retention).Returns(100); } [Test] diff --git a/NzbDrone.Core.Test/IndexerTests/IndexerFixture.cs b/NzbDrone.Core.Test/IndexerTests/IndexerFixture.cs index 077c25e4f..4d41bcbe4 100644 --- a/NzbDrone.Core.Test/IndexerTests/IndexerFixture.cs +++ b/NzbDrone.Core.Test/IndexerTests/IndexerFixture.cs @@ -30,17 +30,17 @@ namespace NzbDrone.Core.Test.IndexerTests { private void WithConfiguredIndexers() { - Mocker.GetMock().SetupGet(c => c.NzbsOrgHash).Returns("MockedConfigValue"); - Mocker.GetMock().SetupGet(c => c.NzbsOrgUId).Returns("MockedConfigValue"); + Mocker.GetMock().SetupGet(c => c.NzbsOrgHash).Returns("MockedConfigValue"); + Mocker.GetMock().SetupGet(c => c.NzbsOrgUId).Returns("MockedConfigValue"); - Mocker.GetMock().SetupGet(c => c.NzbsrusHash).Returns("MockedConfigValue"); - Mocker.GetMock().SetupGet(c => c.NzbsrusUId).Returns("MockedConfigValue"); + Mocker.GetMock().SetupGet(c => c.NzbsrusHash).Returns("MockedConfigValue"); + Mocker.GetMock().SetupGet(c => c.NzbsrusUId).Returns("MockedConfigValue"); - Mocker.GetMock().SetupGet(c => c.FileSharingTalkUid).Returns("MockedConfigValue"); - Mocker.GetMock().SetupGet(c => c.FileSharingTalkSecret).Returns("MockedConfigValue"); + Mocker.GetMock().SetupGet(c => c.FileSharingTalkUid).Returns("MockedConfigValue"); + Mocker.GetMock().SetupGet(c => c.FileSharingTalkSecret).Returns("MockedConfigValue"); - Mocker.GetMock().SetupGet(c => c.OmgwtfnzbsUsername).Returns("MockedConfigValue"); - Mocker.GetMock().SetupGet(c => c.OmgwtfnzbsApiKey).Returns("MockedConfigValue"); + Mocker.GetMock().SetupGet(c => c.OmgwtfnzbsUsername).Returns("MockedConfigValue"); + Mocker.GetMock().SetupGet(c => c.OmgwtfnzbsApiKey).Returns("MockedConfigValue"); } [TestCase("nzbsrus.xml")] diff --git a/NzbDrone.Core.Test/JobTests/BacklogSearchJobTest.cs b/NzbDrone.Core.Test/JobTests/BacklogSearchJobTest.cs index 3cd091a86..88a4f3ae6 100644 --- a/NzbDrone.Core.Test/JobTests/BacklogSearchJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/BacklogSearchJobTest.cs @@ -22,7 +22,7 @@ namespace NzbDrone.Core.Test.JobTests { private void WithEnableBacklogSearching() { - Mocker.GetMock().SetupGet(s => s.EnableBacklogSearching).Returns(true); + Mocker.GetMock().SetupGet(s => s.EnableBacklogSearching).Returns(true); } [Test] diff --git a/NzbDrone.Core.Test/JobTests/PostDownloadScanJobFixture.cs b/NzbDrone.Core.Test/JobTests/PostDownloadScanJobFixture.cs index 98ffaf34d..db0eb5e87 100644 --- a/NzbDrone.Core.Test/JobTests/PostDownloadScanJobFixture.cs +++ b/NzbDrone.Core.Test/JobTests/PostDownloadScanJobFixture.cs @@ -45,7 +45,7 @@ namespace NzbDrone.Core.Test.JobTests Mocker.GetMock().Setup(s => s.ProcessDropFolder(path)); Mocker.Resolve().Start(MockNotification, new { Path = path }); - Mocker.GetMock().Verify(s => s.DownloadClientTvDirectory, Times.Never()); + Mocker.GetMock().Verify(s => s.DownloadClientTvDirectory, Times.Never()); } [Test] @@ -53,10 +53,10 @@ namespace NzbDrone.Core.Test.JobTests { var path = @"C:\Test\Unsorted TV"; - Mocker.GetMock().SetupGet(s => s.DownloadClientTvDirectory).Returns(path); + Mocker.GetMock().SetupGet(s => s.DownloadClientTvDirectory).Returns(path); Mocker.Resolve().Start(MockNotification, null); - Mocker.GetMock().Verify(s => s.DownloadClientTvDirectory, Times.Once()); + Mocker.GetMock().Verify(s => s.DownloadClientTvDirectory, Times.Once()); } [Test] @@ -64,7 +64,7 @@ namespace NzbDrone.Core.Test.JobTests { var path = @"C:\Test\Unsorted TV"; - Mocker.GetMock().SetupGet(s => s.DownloadClientTvDirectory).Returns(path); + Mocker.GetMock().SetupGet(s => s.DownloadClientTvDirectory).Returns(path); Mocker.Resolve().Start(MockNotification, null); Mocker.GetMock().Verify(s => s.ProcessDropFolder(path), Times.Once()); diff --git a/NzbDrone.Core.Test/JobTests/RecentBacklogSearchJobTest.cs b/NzbDrone.Core.Test/JobTests/RecentBacklogSearchJobTest.cs index 2023d7d6b..08354e383 100644 --- a/NzbDrone.Core.Test/JobTests/RecentBacklogSearchJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/RecentBacklogSearchJobTest.cs @@ -25,7 +25,7 @@ namespace NzbDrone.Core.Test.JobTests { private void WithEnableBacklogSearching() { - Mocker.GetMock().SetupGet(s => s.EnableBacklogSearching).Returns(true); + Mocker.GetMock().SetupGet(s => s.EnableBacklogSearching).Returns(true); } [SetUp] diff --git a/NzbDrone.Core.Test/JobTests/RssSyncJobTest.cs b/NzbDrone.Core.Test/JobTests/RssSyncJobTest.cs index 4bf9d2892..eee4fc2e3 100644 --- a/NzbDrone.Core.Test/JobTests/RssSyncJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/RssSyncJobTest.cs @@ -19,7 +19,7 @@ namespace NzbDrone.Core.Test.JobTests { public void WithMinutes(int minutes) { - Mocker.GetMock().SetupGet(s => s.RssSyncInterval).Returns(minutes); + Mocker.GetMock().SetupGet(s => s.RssSyncInterval).Returns(minutes); } [TestCase(10)] diff --git a/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/CleanUpFixture.cs b/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/CleanUpFixture.cs index 386a79ab1..5e5465770 100644 --- a/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/CleanUpFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTests/CleanUpFixture.cs @@ -91,7 +91,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests Mocker.GetMock() .Setup(e => e.Delete(It.IsAny())); - Mocker.GetMock() + Mocker.GetMock() .SetupGet(s => s.AutoIgnorePreviouslyDownloadedEpisodes) .Returns(true); diff --git a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/BlackholeProviderFixture.cs b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/BlackholeProviderFixture.cs index a2a401325..bf0022573 100644 --- a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/BlackholeProviderFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/BlackholeProviderFixture.cs @@ -27,7 +27,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests [SetUp] public void Setup() { - Mocker.GetMock().SetupGet(c => c.BlackholeDirectory).Returns(blackHoleFolder); + Mocker.GetMock().SetupGet(c => c.BlackholeDirectory).Returns(blackHoleFolder); } diff --git a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/NzbgetProviderTests/DownloadNzbFixture.cs b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/NzbgetProviderTests/DownloadNzbFixture.cs index 1036b0e4f..630ba347c 100644 --- a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/NzbgetProviderTests/DownloadNzbFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/NzbgetProviderTests/DownloadNzbFixture.cs @@ -20,7 +20,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests.NzbgetProviderTes [SetUp] public void Setup() { - var fakeConfig = Mocker.GetMock(); + var fakeConfig = Mocker.GetMock(); fakeConfig.SetupGet(c => c.NzbgetHost).Returns("192.168.5.55"); fakeConfig.SetupGet(c => c.NzbgetPort).Returns(6789); fakeConfig.SetupGet(c => c.NzbgetUsername).Returns("nzbget"); diff --git a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/NzbgetProviderTests/QueueFixture.cs b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/NzbgetProviderTests/QueueFixture.cs index 9ed0aef8c..c8f0d5d5a 100644 --- a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/NzbgetProviderTests/QueueFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/NzbgetProviderTests/QueueFixture.cs @@ -20,7 +20,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests.NzbgetProviderTes [SetUp] public void Setup() { - var fakeConfig = Mocker.GetMock(); + var fakeConfig = Mocker.GetMock(); fakeConfig.SetupGet(c => c.NzbgetHost).Returns("192.168.5.55"); fakeConfig.SetupGet(c => c.NzbgetPort).Returns(6789); fakeConfig.SetupGet(c => c.NzbgetUsername).Returns("nzbget"); diff --git a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/PneumaticProviderFixture.cs b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/PneumaticProviderFixture.cs index faa791f5b..80d746d0e 100644 --- a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/PneumaticProviderFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/PneumaticProviderFixture.cs @@ -30,8 +30,8 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests { nzbPath = pneumaticFolder + title + ".nzb"; - Mocker.GetMock().SetupGet(c => c.PneumaticDirectory).Returns(pneumaticFolder); - Mocker.GetMock().SetupGet(c => c.DownloadClientTvDirectory).Returns(sabDrop); + Mocker.GetMock().SetupGet(c => c.PneumaticDirectory).Returns(pneumaticFolder); + Mocker.GetMock().SetupGet(c => c.DownloadClientTvDirectory).Returns(sabDrop); } private void WithExistingFile() diff --git a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/QueueFixture.cs b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/QueueFixture.cs index f0ad3b22b..96ebb1b9f 100644 --- a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/QueueFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/QueueFixture.cs @@ -36,7 +36,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests.SabProviderTests string password = "pass"; string cat = "tv"; - var fakeConfig = Mocker.GetMock(); + var fakeConfig = Mocker.GetMock(); fakeConfig.SetupGet(c => c.SabHost).Returns(sabHost); fakeConfig.SetupGet(c => c.SabPort).Returns(sabPort); fakeConfig.SetupGet(c => c.SabApiKey).Returns(apikey); diff --git a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/SabProviderFixture.cs b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/SabProviderFixture.cs index 3c0f5e0f7..66584633d 100644 --- a/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/SabProviderFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DownloadClientTests/SabProviderTests/SabProviderFixture.cs @@ -32,7 +32,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests.SabProviderTests [SetUp] public void Setup() { - var fakeConfig = Mocker.GetMock(); + var fakeConfig = Mocker.GetMock(); fakeConfig.SetupGet(c => c.SabHost).Returns("192.168.5.55"); fakeConfig.SetupGet(c => c.SabPort).Returns(2222); @@ -210,11 +210,11 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests.SabProviderTests [Test] public void downloadNzb_should_use_sabRecentTvPriority_when_recentEpisode_is_true() { - Mocker.GetMock() + Mocker.GetMock() .SetupGet(s => s.SabRecentTvPriority) .Returns(SabPriorityType.High); - Mocker.GetMock() + Mocker.GetMock() .SetupGet(s => s.SabBacklogTvPriority) .Returns(SabPriorityType.Low); @@ -232,11 +232,11 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadClientTests.SabProviderTests [Test] public void downloadNzb_should_use_sabBackogTvPriority_when_recentEpisode_is_false() { - Mocker.GetMock() + Mocker.GetMock() .SetupGet(s => s.SabRecentTvPriority) .Returns(SabPriorityType.High); - Mocker.GetMock() + Mocker.GetMock() .SetupGet(s => s.SabBacklogTvPriority) .Returns(SabPriorityType.Low); diff --git a/NzbDrone.Core.Test/ProviderTests/DownloadProviderTests/DownloadProviderFixture.cs b/NzbDrone.Core.Test/ProviderTests/DownloadProviderTests/DownloadProviderFixture.cs index ed3d282ae..b9801c509 100644 --- a/NzbDrone.Core.Test/ProviderTests/DownloadProviderTests/DownloadProviderFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DownloadProviderTests/DownloadProviderFixture.cs @@ -24,7 +24,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadProviderTests private void SetDownloadClient(DownloadClientType clientType) { - Mocker.GetMock() + Mocker.GetMock() .Setup(c => c.DownloadClient) .Returns(clientType); } @@ -90,7 +90,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DownloadProviderTests .Verify(s => s.DownloadNzb(It.IsAny(), It.IsAny(), true), Times.Never()); - VerifyEventPublished(It.Is(c => c.ParseResult == parseResult)); + VerifyEventPublished(); } [TestCase(DownloadClientType.Sabnzbd)] diff --git a/NzbDrone.Core.Test/ProviderTests/MediaFileProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/MediaFileProviderTest.cs index 3a4df63ca..86a1c3b8b 100644 --- a/NzbDrone.Core.Test/ProviderTests/MediaFileProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/MediaFileProviderTest.cs @@ -134,7 +134,7 @@ namespace NzbDrone.Core.Test.ProviderTests .Build(); - Mocker.GetMock().Setup(e => e.SortingSeasonFolderFormat).Returns(seasonFolderFormat); + Mocker.GetMock().Setup(e => e.SortingSeasonFolderFormat).Returns(seasonFolderFormat); //Act var result = Mocker.Resolve().CalculateFilePath(fakeSeries, 1, filename, ".mkv"); diff --git a/NzbDrone.Core.Test/ProviderTests/Metadata/Xbmc_ForEpisodeFile_Fixture.cs b/NzbDrone.Core.Test/ProviderTests/Metadata/Xbmc_ForEpisodeFile_Fixture.cs index a5950f0e6..b0ef9a5ac 100644 --- a/NzbDrone.Core.Test/ProviderTests/Metadata/Xbmc_ForEpisodeFile_Fixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/Metadata/Xbmc_ForEpisodeFile_Fixture.cs @@ -94,7 +94,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata private void WithUseBanners() { - Mocker.GetMock().SetupGet(s => s.MetadataUseBanners).Returns(true); + Mocker.GetMock().SetupGet(s => s.MetadataUseBanners).Returns(true); } private void WithSingleEpisodeFile() diff --git a/NzbDrone.Core.Test/ProviderTests/Metadata/Xbmc_ForSeries_Fixture.cs b/NzbDrone.Core.Test/ProviderTests/Metadata/Xbmc_ForSeries_Fixture.cs index 3eb746724..b488c3cb5 100644 --- a/NzbDrone.Core.Test/ProviderTests/Metadata/Xbmc_ForSeries_Fixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/Metadata/Xbmc_ForSeries_Fixture.cs @@ -76,7 +76,7 @@ namespace NzbDrone.Core.Test.ProviderTests.Metadata private void WithUseBanners() { - Mocker.GetMock().SetupGet(s => s.MetadataUseBanners).Returns(true); + Mocker.GetMock().SetupGet(s => s.MetadataUseBanners).Returns(true); } private void WithSpecials() diff --git a/NzbDrone.Core.Test/ProviderTests/PlexProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/PlexProviderTest.cs index fd14cd274..be7357d1a 100644 --- a/NzbDrone.Core.Test/ProviderTests/PlexProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/PlexProviderTest.cs @@ -27,22 +27,22 @@ namespace NzbDrone.Core.Test.ProviderTests { private void WithSingleClient() { - Mocker.GetMock().SetupGet(s => s.PlexClientHosts) + Mocker.GetMock().SetupGet(s => s.PlexClientHosts) .Returns("localhost:3000"); } private void WithMultipleClients() { - Mocker.GetMock().SetupGet(s => s.PlexClientHosts) + Mocker.GetMock().SetupGet(s => s.PlexClientHosts) .Returns("localhost:3000, 192.168.0.10:3000"); } public void WithClientCredentials() { - Mocker.GetMock().SetupGet(s => s.PlexUsername) + Mocker.GetMock().SetupGet(s => s.PlexUsername) .Returns("plex"); - Mocker.GetMock().SetupGet(s => s.PlexPassword) + Mocker.GetMock().SetupGet(s => s.PlexPassword) .Returns("plex"); } diff --git a/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs b/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs index 96765c1f1..117180fb8 100644 --- a/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/CleanupFixture.cs @@ -50,7 +50,7 @@ namespace NzbDrone.Core.Test.ProviderTests.RecycleBinProviderTests [SetUp] public void Setup() { - Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(RecycleBin); + Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(RecycleBin); Mocker.GetMock().Setup(s => s.GetDirectories(RecycleBin)) .Returns(new [] { @"C:\Test\RecycleBin\Folder1", @"C:\Test\RecycleBin\Folder2", @"C:\Test\RecycleBin\Folder3" }); @@ -62,7 +62,7 @@ namespace NzbDrone.Core.Test.ProviderTests.RecycleBinProviderTests [Test] public void should_return_if_recycleBin_not_configured() { - Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(String.Empty); + Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(String.Empty); Mocker.Resolve().Cleanup(); diff --git a/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteDirectoryFixture.cs b/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteDirectoryFixture.cs index 96fe0f0e1..1201b755a 100644 --- a/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteDirectoryFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteDirectoryFixture.cs @@ -29,12 +29,12 @@ namespace NzbDrone.Core.Test.ProviderTests.RecycleBinProviderTests { private void WithRecycleBin() { - Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(@"C:\Test\Recycle Bin"); + Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(@"C:\Test\Recycle Bin"); } private void WithoutRecycleBin() { - Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(String.Empty); + Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(String.Empty); } [Test] diff --git a/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteFileFixture.cs b/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteFileFixture.cs index 5cb50516c..ba9e08aa3 100644 --- a/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteFileFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/DeleteFileFixture.cs @@ -29,12 +29,12 @@ namespace NzbDrone.Core.Test.ProviderTests.RecycleBinProviderTests { private void WithRecycleBin() { - Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(@"C:\Test\Recycle Bin"); + Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(@"C:\Test\Recycle Bin"); } private void WithoutRecycleBin() { - Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(String.Empty); + Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(String.Empty); } [Test] diff --git a/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs b/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs index a099b4efd..39684b9f5 100644 --- a/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/RecycleBinProviderTests/EmptyFixture.cs @@ -32,7 +32,7 @@ namespace NzbDrone.Core.Test.ProviderTests.RecycleBinProviderTests [SetUp] public void Setup() { - Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(RecycleBin); + Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(RecycleBin); Mocker.GetMock().Setup(s => s.GetDirectories(RecycleBin)) .Returns(new [] { @"C:\Test\RecycleBin\Folder1", @"C:\Test\RecycleBin\Folder2", @"C:\Test\RecycleBin\Folder3" }); @@ -44,7 +44,7 @@ namespace NzbDrone.Core.Test.ProviderTests.RecycleBinProviderTests [Test] public void should_return_if_recycleBin_not_configured() { - Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(String.Empty); + Mocker.GetMock().SetupGet(s => s.RecycleBin).Returns(String.Empty); Mocker.Resolve().Empty(); diff --git a/NzbDrone.Core.Test/ProviderTests/ReferenceDataProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/ReferenceDataProviderTest.cs index db4167277..801fe8e87 100644 --- a/NzbDrone.Core.Test/ProviderTests/ReferenceDataProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/ReferenceDataProviderTest.cs @@ -27,7 +27,7 @@ namespace NzbDrone.Core.Test.ProviderTests [SetUp] public void Setup() { - Mocker.GetMock().SetupGet(s => s.ServiceRootUrl) + Mocker.GetMock().SetupGet(s => s.ServiceRootUrl) .Returns("http://services.nzbdrone.com"); } diff --git a/NzbDrone.Core.Test/ProviderTests/SceneMappingProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/SceneMappingProviderTest.cs index 6273247c7..a5017ec5d 100644 --- a/NzbDrone.Core.Test/ProviderTests/SceneMappingProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/SceneMappingProviderTest.cs @@ -24,7 +24,7 @@ namespace NzbDrone.Core.Test.ProviderTests [SetUp] public void Setup() { - Mocker.GetMock().SetupGet(s => s.ServiceRootUrl) + Mocker.GetMock().SetupGet(s => s.ServiceRootUrl) .Returns("http://services.nzbdrone.com"); WithRealDb(); diff --git a/NzbDrone.Core.Test/ProviderTests/UpdateProviderTests/GetAvilableUpdateFixture.cs b/NzbDrone.Core.Test/ProviderTests/UpdateProviderTests/GetAvilableUpdateFixture.cs index c68ccadb7..d345c11b3 100644 --- a/NzbDrone.Core.Test/ProviderTests/UpdateProviderTests/GetAvilableUpdateFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/UpdateProviderTests/GetAvilableUpdateFixture.cs @@ -23,7 +23,7 @@ namespace NzbDrone.Core.Test.ProviderTests.UpdateProviderTests { WithStrictMocker(); - Mocker.GetMock().SetupGet(c => c.UpdateUrl).Returns("http://update.nzbdrone.com/_test/"); + Mocker.GetMock().SetupGet(c => c.UpdateUrl).Returns("http://update.nzbdrone.com/_test/"); Mocker.Resolve(); } diff --git a/NzbDrone.Core.Test/ProviderTests/XbmcProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/XbmcProviderTest.cs index b2fc31659..4de9d9a0c 100644 --- a/NzbDrone.Core.Test/ProviderTests/XbmcProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/XbmcProviderTest.cs @@ -297,7 +297,7 @@ namespace NzbDrone.Core.Test.ProviderTests var header = "NzbDrone Test"; var message = "Test Message!"; - var fakeConfig = Mocker.GetMock(); + var fakeConfig = Mocker.GetMock(); fakeConfig.SetupGet(s => s.XbmcHosts).Returns("localhost:8080"); //var fakeUdpProvider = Mocker.GetMock(); @@ -441,7 +441,7 @@ namespace NzbDrone.Core.Test.ProviderTests //Setup WithStrictMocker(); - var fakeConfig = Mocker.GetMock(); + var fakeConfig = Mocker.GetMock(); fakeConfig.SetupGet(s => s.XbmcHosts).Returns("localhost:8080"); var fakeEventClient = Mocker.GetMock(); diff --git a/NzbDrone.Core.Test/TvTests/EpisodeProviderTests/EpisodeProviderTest.cs b/NzbDrone.Core.Test/TvTests/EpisodeProviderTests/EpisodeProviderTest.cs index c371a7987..867317f4c 100644 --- a/NzbDrone.Core.Test/TvTests/EpisodeProviderTests/EpisodeProviderTest.cs +++ b/NzbDrone.Core.Test/TvTests/EpisodeProviderTests/EpisodeProviderTest.cs @@ -816,7 +816,7 @@ namespace NzbDrone.Core.Test.TvTests.EpisodeProviderTests WithRealDb(); Mocker.Resolve(); - Mocker.GetMock() + Mocker.GetMock() .Setup(e => e.DefaultQualityProfile).Returns(1); Db.Insert(Builder.CreateNew().Build()); diff --git a/NzbDrone.Core.Test/TvTests/SeriesProviderTest.cs b/NzbDrone.Core.Test/TvTests/SeriesProviderTest.cs index d6f3acf596848834a68093824518d589981f24b8..f7c2c0e667cf0503de1309aaac4a3d02f9311950 100644 GIT binary patch delta 14 VcmaDX^+akzEE}We=2$j1b^t2E1bhGh delta 12 TcmaDN^;l{{EZgQdHa2zuBJBh- diff --git a/NzbDrone.Test.Common/TestBase.cs b/NzbDrone.Test.Common/TestBase.cs index 4a9df9a75..1bd571559 100644 --- a/NzbDrone.Test.Common/TestBase.cs +++ b/NzbDrone.Test.Common/TestBase.cs @@ -101,9 +101,9 @@ namespace NzbDrone.Test.Common return Path.Combine(Directory.GetCurrentDirectory(), "Files", fileName); } - protected void VerifyEventPublished(TEvent message) where TEvent : IEvent + protected void VerifyEventPublished() where TEvent : IEvent { - Mocker.GetMock().Verify(c => c.Publish(message), Times.Once()); + Mocker.GetMock().Verify(c => c.Publish(It.IsAny()), Times.Once()); } protected void VerifyEventNotPublished() where TEvent : IEvent