From 69ddeeb0e3858980546f7005237803b4eff2d335 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 19 Dec 2011 16:58:26 -0800 Subject: [PATCH] Fixed spelling for Expected[LogType]. Fixed broken tests for GetEpisodesByParseResult. --- NzbDrone.Common.Test/DiskProviderTests.cs | 2 +- NzbDrone.Common.Test/ProcessProviderTests.cs | 6 +++--- NzbDrone.Common.Test/ServiceProviderTests.cs | 2 +- NzbDrone.Core.Test/IndexerTests.cs | 4 ++-- NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs | 2 +- .../JobTests/ImportNewSeriesJobTest.cs | 2 +- NzbDrone.Core.Test/ParserTest.cs | 8 ++++---- .../ProviderTests/DiskScanProviderTest.cs | 2 +- .../ProviderTests/DiskScanProviderTest_ImportFile.cs | 2 +- .../EpisodeProviderTest_GetEpisodesByParseResult.cs | 5 ++++- .../JobProviderTests/JobProviderFixture.cs | 6 +++--- .../LogProviderTests/LogProviderFixture.cs | 4 ++-- .../ProcessDownloadProviderFixture.cs | 12 ++++++------ .../ProviderTests/ProwlProviderTest.cs | 4 ++-- .../ProviderTests/ReferenceDataProviderTest.cs | 2 +- NzbDrone.Core.Test/ProviderTests/SabProviderTest.cs | 2 +- .../SearchProviderTests/PerformSearchFixture.cs | 4 ++-- .../SearchProviderTests/SearchFixture.cs | 2 +- NzbDrone.Test.Common/ExceptionVerification.cs | 12 ++++++------ NzbDrone.Update.Test/UpdateProviderStartFixture.cs | 6 +++--- 20 files changed, 46 insertions(+), 43 deletions(-) diff --git a/NzbDrone.Common.Test/DiskProviderTests.cs b/NzbDrone.Common.Test/DiskProviderTests.cs index 54ce8977f..a39d7a5e6 100644 --- a/NzbDrone.Common.Test/DiskProviderTests.cs +++ b/NzbDrone.Common.Test/DiskProviderTests.cs @@ -59,7 +59,7 @@ namespace NzbDrone.Common.Test diskProvider.MoveFile(targetPath, targetPath); File.Exists(targetPath).Should().BeTrue(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [Test] diff --git a/NzbDrone.Common.Test/ProcessProviderTests.cs b/NzbDrone.Common.Test/ProcessProviderTests.cs index bb8f44a29..7e4c764ac 100644 --- a/NzbDrone.Common.Test/ProcessProviderTests.cs +++ b/NzbDrone.Common.Test/ProcessProviderTests.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Common.Test public void Kill_should_not_fail_on_invalid_process_is(int processId) { _processProvider.Kill(processId); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [Test] @@ -43,7 +43,7 @@ namespace NzbDrone.Common.Test { _processProvider.GetProcessById(1234567).Should().BeNull(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [TestCase(0)] @@ -53,7 +53,7 @@ namespace NzbDrone.Common.Test { _processProvider.GetProcessById(processId).Should().BeNull(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [Test] diff --git a/NzbDrone.Common.Test/ServiceProviderTests.cs b/NzbDrone.Common.Test/ServiceProviderTests.cs index 2831403f4..99488c7eb 100644 --- a/NzbDrone.Common.Test/ServiceProviderTests.cs +++ b/NzbDrone.Common.Test/ServiceProviderTests.cs @@ -105,7 +105,7 @@ namespace NzbDrone.Common.Test serviceProvider.GetService(ALWAYS_INSTALLED_SERVICE).Status .Should().Be(ServiceControllerStatus.Stopped); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } } } diff --git a/NzbDrone.Core.Test/IndexerTests.cs b/NzbDrone.Core.Test/IndexerTests.cs index 84c6125d9..44c8cbb72 100644 --- a/NzbDrone.Core.Test/IndexerTests.cs +++ b/NzbDrone.Core.Test/IndexerTests.cs @@ -57,7 +57,7 @@ namespace NzbDrone.Core.Test parseResults.Should().OnlyContain(s => s.Indexer == mockIndexer.Name); parseResults.Should().OnlyContain(s => !String.IsNullOrEmpty(s.NzbTitle)); - ExceptionVerification.ExcpectedWarns(warns); + ExceptionVerification.ExpectedWarns(warns); } [Test] @@ -170,7 +170,7 @@ namespace NzbDrone.Core.Test Assert.IsNotNull(result); Assert.AreEqual(LanguageType.Finnish, result.Language); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [Test] diff --git a/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs b/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs index 13a6612aa..c9177f841 100644 --- a/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs @@ -101,7 +101,7 @@ namespace NzbDrone.Core.Test.JobTests Mocker.VerifyAllMocks(); - ExceptionVerification.ExcpectedErrors(2); + ExceptionVerification.ExpectedErrors(2); } [Test] diff --git a/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs b/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs index 93434eeee..f68dc6d6b 100644 --- a/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/ImportNewSeriesJobTest.cs @@ -134,7 +134,7 @@ namespace NzbDrone.Core.Test.JobTests Mocker.GetMock().Verify(j => j.Start(notification, series[0].SeriesId, 0), Times.Once()); - ExceptionVerification.ExcpectedErrors(1); + ExceptionVerification.ExpectedErrors(1); } diff --git a/NzbDrone.Core.Test/ParserTest.cs b/NzbDrone.Core.Test/ParserTest.cs index 0d1e58bc9..1ea4f0fb0 100644 --- a/NzbDrone.Core.Test/ParserTest.cs +++ b/NzbDrone.Core.Test/ParserTest.cs @@ -193,7 +193,7 @@ namespace NzbDrone.Core.Test Parser.ParseTitle(title).Should().BeNull(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } @@ -368,7 +368,7 @@ namespace NzbDrone.Core.Test var result = Parser.ParseTitle(postTitle); result.Should().BeNull(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [TestCase("Lie.to.Me.S03.SUBPACK.DVDRip.XviD-REWARD")] @@ -380,7 +380,7 @@ namespace NzbDrone.Core.Test result.Should().BeNull(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [TestCase("Fussball Bundesliga 2010 2011 30 Spieltag FC Bayern Muenchen vs Bayer 04 Leverkusen German WS dTV XviD WoGS")] @@ -388,7 +388,7 @@ namespace NzbDrone.Core.Test { Parser.ParseTitle(title); ExceptionVerification.IgnoreWarns(); - ExceptionVerification.ExcpectedErrors(1); + ExceptionVerification.ExpectedErrors(1); } } } diff --git a/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTest.cs index 7583b99a4..45eb958d8 100644 --- a/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTest.cs @@ -164,7 +164,7 @@ namespace NzbDrone.Core.Test.ProviderTests //Assert Mocker.VerifyAllMocks(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [Test] diff --git a/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTest_ImportFile.cs b/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTest_ImportFile.cs index 7dcf8a1f7..c16b32051 100644 --- a/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTest_ImportFile.cs +++ b/NzbDrone.Core.Test/ProviderTests/DiskScanProviderTest_ImportFile.cs @@ -137,7 +137,7 @@ namespace NzbDrone.Core.Test.ProviderTests //Assert VerifySkipImport(result, Mocker); - ExceptionVerification.ExcpectedWarns(2); + ExceptionVerification.ExpectedWarns(2); } [Test] diff --git a/NzbDrone.Core.Test/ProviderTests/EpisodeProviderTest_GetEpisodesByParseResult.cs b/NzbDrone.Core.Test/ProviderTests/EpisodeProviderTest_GetEpisodesByParseResult.cs index b79bf13d2..178e09dd0 100644 --- a/NzbDrone.Core.Test/ProviderTests/EpisodeProviderTest_GetEpisodesByParseResult.cs +++ b/NzbDrone.Core.Test/ProviderTests/EpisodeProviderTest_GetEpisodesByParseResult.cs @@ -251,6 +251,7 @@ namespace NzbDrone.Core.Test.ProviderTests var fakeSeries = Builder.CreateNew() .With(s => s.SeriesId = 1) + .With(s => s.IsDaily = true) .Build(); Mocker.GetMock().Setup( @@ -279,6 +280,7 @@ namespace NzbDrone.Core.Test.ProviderTests var fakeSeries = Builder.CreateNew() .With(s => s.SeriesId = 1) + .With(s => s.IsDaily = true) .Build(); //Act @@ -303,6 +305,7 @@ namespace NzbDrone.Core.Test.ProviderTests var fakeSeries = Builder.CreateNew() .With(s => s.SeriesId = 1) + .With(s => s.IsDaily = true) .Build(); //Act @@ -406,7 +409,7 @@ namespace NzbDrone.Core.Test.ProviderTests var ep = Mocker.Resolve().GetEpisodesByParseResult(parseResult); ep.Should().BeEmpty(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } } } diff --git a/NzbDrone.Core.Test/ProviderTests/JobProviderTests/JobProviderFixture.cs b/NzbDrone.Core.Test/ProviderTests/JobProviderTests/JobProviderFixture.cs index 212befc59..e923c0691 100644 --- a/NzbDrone.Core.Test/ProviderTests/JobProviderTests/JobProviderFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/JobProviderTests/JobProviderFixture.cs @@ -99,7 +99,7 @@ namespace NzbDrone.Core.Test.ProviderTests.JobProviderTests settings.First().LastExecution.Should().BeWithin(TimeSpan.FromSeconds(10)); settings.First().Success.Should().BeFalse(); brokenJob.ExecutionCount.Should().Be(1); - ExceptionVerification.ExcpectedErrors(1); + ExceptionVerification.ExpectedErrors(1); } [Test] @@ -182,7 +182,7 @@ namespace NzbDrone.Core.Test.ProviderTests.JobProviderTests //Assert brokenJob.ExecutionCount.Should().Be(2); - ExceptionVerification.ExcpectedErrors(2); + ExceptionVerification.ExpectedErrors(2); } [Test] @@ -487,7 +487,7 @@ namespace NzbDrone.Core.Test.ProviderTests.JobProviderTests jobProvider.QueueJob(typeof(string)); WaitForQueue(); - ExceptionVerification.ExcpectedErrors(1); + ExceptionVerification.ExpectedErrors(1); } } diff --git a/NzbDrone.Core.Test/ProviderTests/LogProviderTests/LogProviderFixture.cs b/NzbDrone.Core.Test/ProviderTests/LogProviderTests/LogProviderFixture.cs index fbd9616f2..bd119158d 100644 --- a/NzbDrone.Core.Test/ProviderTests/LogProviderTests/LogProviderFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/LogProviderTests/LogProviderFixture.cs @@ -105,7 +105,7 @@ namespace NzbDrone.Core.Test.ProviderTests.LogProviderTests logItem.ExceptionType.Should().Be(ex.GetType().ToString()); logItem.Exception.Should().Be(ex.ToString()); - ExceptionVerification.ExcpectedErrors(1); + ExceptionVerification.ExpectedErrors(1); } [Test] @@ -125,7 +125,7 @@ namespace NzbDrone.Core.Test.ProviderTests.LogProviderTests VerifyLog(logItem, LogLevel.Error); - ExceptionVerification.ExcpectedErrors(1); + ExceptionVerification.ExpectedErrors(1); } [Test] diff --git a/NzbDrone.Core.Test/ProviderTests/PostDownloadProviderTests/ProcessDownloadProviderFixture.cs b/NzbDrone.Core.Test/ProviderTests/PostDownloadProviderTests/ProcessDownloadProviderFixture.cs index 57993f73f..f2aea1594 100644 --- a/NzbDrone.Core.Test/ProviderTests/PostDownloadProviderTests/ProcessDownloadProviderFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/PostDownloadProviderTests/ProcessDownloadProviderFixture.cs @@ -45,7 +45,7 @@ namespace NzbDrone.Core.Test.ProviderTests.PostDownloadProviderTests //Assert Mocker.VerifyAllMocks(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } @@ -61,7 +61,7 @@ namespace NzbDrone.Core.Test.ProviderTests.PostDownloadProviderTests //Assert Mocker.VerifyAllMocks(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [Test] @@ -81,7 +81,7 @@ namespace NzbDrone.Core.Test.ProviderTests.PostDownloadProviderTests //Assert Mocker.VerifyAllMocks(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [Test] @@ -108,7 +108,7 @@ namespace NzbDrone.Core.Test.ProviderTests.PostDownloadProviderTests //Assert Mocker.VerifyAllMocks(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } @@ -141,7 +141,7 @@ namespace NzbDrone.Core.Test.ProviderTests.PostDownloadProviderTests //Assert Mocker.VerifyAllMocks(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [TestCase(@"\_UnknownSeries_The Office - S01E01 - Episode Title")] @@ -184,7 +184,7 @@ namespace NzbDrone.Core.Test.ProviderTests.PostDownloadProviderTests //Assert Mocker.VerifyAllMocks(); Mocker.GetMock().Verify(c => c.MoveDirectory(droppedFolder.FullName, taggedFolder), Times.Once()); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [Test] diff --git a/NzbDrone.Core.Test/ProviderTests/ProwlProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/ProwlProviderTest.cs index a6501c3af..3a8f4819f 100644 --- a/NzbDrone.Core.Test/ProviderTests/ProwlProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/ProwlProviderTest.cs @@ -49,7 +49,7 @@ namespace NzbDrone.Core.Test.ProviderTests var result = Mocker.Resolve().Verify(_badApiKey); //Assert - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); result.Should().BeFalse(); } @@ -76,7 +76,7 @@ namespace NzbDrone.Core.Test.ProviderTests var result = Mocker.Resolve().SendNotification("NzbDrone Test", "This is a test message from NzbDrone", _badApiKey); //Assert - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); result.Should().BeFalse(); } diff --git a/NzbDrone.Core.Test/ProviderTests/ReferenceDataProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/ReferenceDataProviderTest.cs index d1a50f068..b8c554cf7 100644 --- a/NzbDrone.Core.Test/ProviderTests/ReferenceDataProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/ReferenceDataProviderTest.cs @@ -63,7 +63,7 @@ namespace NzbDrone.Core.Test.ProviderTests //Assert result.Should().HaveCount(0); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [Test] diff --git a/NzbDrone.Core.Test/ProviderTests/SabProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/SabProviderTest.cs index c724fff7e..e2dcd0f91 100644 --- a/NzbDrone.Core.Test/ProviderTests/SabProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/SabProviderTest.cs @@ -155,7 +155,7 @@ namespace NzbDrone.Core.Test.ProviderTests //Assert Assert.IsFalse(result); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } [Test] diff --git a/NzbDrone.Core.Test/ProviderTests/SearchProviderTests/PerformSearchFixture.cs b/NzbDrone.Core.Test/ProviderTests/SearchProviderTests/PerformSearchFixture.cs index 3d87877f4..ccc13ed59 100644 --- a/NzbDrone.Core.Test/ProviderTests/SearchProviderTests/PerformSearchFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/SearchProviderTests/PerformSearchFixture.cs @@ -208,7 +208,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchProviderTests Mocker.GetMock().Verify(c => c.GetSceneName(_series.SeriesId), Times.Once()); - ExceptionVerification.ExcpectedErrors(1); + ExceptionVerification.ExpectedErrors(1); } [Test] @@ -275,7 +275,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchProviderTests //Assert result.Should().HaveCount(0); - ExceptionVerification.ExcpectedErrors(2); + ExceptionVerification.ExpectedErrors(2); } [Test] diff --git a/NzbDrone.Core.Test/ProviderTests/SearchProviderTests/SearchFixture.cs b/NzbDrone.Core.Test/ProviderTests/SearchProviderTests/SearchFixture.cs index 13670e5a5..c4e207cc8 100644 --- a/NzbDrone.Core.Test/ProviderTests/SearchProviderTests/SearchFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/SearchProviderTests/SearchFixture.cs @@ -200,7 +200,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchProviderTests //Assert result.Should().BeFalse(); - ExceptionVerification.ExcpectedWarns(1); + ExceptionVerification.ExpectedWarns(1); } } } diff --git a/NzbDrone.Test.Common/ExceptionVerification.cs b/NzbDrone.Test.Common/ExceptionVerification.cs index 9033cf011..ead7ee9e9 100644 --- a/NzbDrone.Test.Common/ExceptionVerification.cs +++ b/NzbDrone.Test.Common/ExceptionVerification.cs @@ -28,9 +28,9 @@ namespace NzbDrone.Test.Common public static void AssertNoUnexcpectedLogs() { - ExcpectedFatals(0); - ExcpectedErrors(0); - ExcpectedWarns(0); + ExpectedFatals(0); + ExpectedErrors(0); + ExpectedWarns(0); } private static string GetLogsString(IEnumerable logs) @@ -49,17 +49,17 @@ namespace NzbDrone.Test.Common return errors; } - public static void ExcpectedErrors(int count) + public static void ExpectedErrors(int count) { Excpected(LogLevel.Error, count); } - public static void ExcpectedFatals(int count) + public static void ExpectedFatals(int count) { Excpected(LogLevel.Fatal, count); } - public static void ExcpectedWarns(int count) + public static void ExpectedWarns(int count) { Excpected(LogLevel.Warn, count); } diff --git a/NzbDrone.Update.Test/UpdateProviderStartFixture.cs b/NzbDrone.Update.Test/UpdateProviderStartFixture.cs index e11427dfb..ec8dd9be7 100644 --- a/NzbDrone.Update.Test/UpdateProviderStartFixture.cs +++ b/NzbDrone.Update.Test/UpdateProviderStartFixture.cs @@ -162,7 +162,7 @@ namespace NzbDrone.Update.Test //Assert Mocker.GetMock() .Verify(c => c.CopyDirectory(BACKUP_FOLDER, TARGET_FOLDER), Times.Once()); - ExceptionVerification.ExcpectedFatals(1); + ExceptionVerification.ExpectedFatals(1); } [Test] @@ -206,7 +206,7 @@ namespace NzbDrone.Update.Test //Assert VerifyServiceRestart(); - ExceptionVerification.ExcpectedFatals(1); + ExceptionVerification.ExpectedFatals(1); } [Test] @@ -224,7 +224,7 @@ namespace NzbDrone.Update.Test //Assert VerifyProcessRestart(); - ExceptionVerification.ExcpectedFatals(1); + ExceptionVerification.ExpectedFatals(1); } private void VerifyServiceRestart()