From 6a26204d8e90a583ded8e9ffe60581afbcb939b3 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 8 Apr 2014 10:22:36 -0700 Subject: [PATCH] Allow episode zero in tests, but fail in season and episode are both zero --- .../MetadataSourceTests/TraktProxyFixture.cs | 4 +++- src/NzbDrone.Core/Notifications/Growl/GrowlService.cs | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core.Test/MetadataSourceTests/TraktProxyFixture.cs b/src/NzbDrone.Core.Test/MetadataSourceTests/TraktProxyFixture.cs index f2fe140d4..41734daed 100644 --- a/src/NzbDrone.Core.Test/MetadataSourceTests/TraktProxyFixture.cs +++ b/src/NzbDrone.Core.Test/MetadataSourceTests/TraktProxyFixture.cs @@ -96,7 +96,9 @@ namespace NzbDrone.Core.Test.MetadataSourceTests private void ValidateEpisode(Episode episode) { episode.Should().NotBeNull(); - episode.EpisodeNumber.Should().NotBe(0); + + //TODO: Is there a better way to validate that episode number or season number is greater than zero? + (episode.EpisodeNumber + episode.SeasonNumber).Should().NotBe(0); episode.Should().NotBeNull(); diff --git a/src/NzbDrone.Core/Notifications/Growl/GrowlService.cs b/src/NzbDrone.Core/Notifications/Growl/GrowlService.cs index ce0ca87ef..d7d8686f3 100644 --- a/src/NzbDrone.Core/Notifications/Growl/GrowlService.cs +++ b/src/NzbDrone.Core/Notifications/Growl/GrowlService.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading; using Growl.Connector; using NLog; using NzbDrone.Common.Instrumentation; @@ -63,6 +64,8 @@ namespace NzbDrone.Core.Notifications.Growl const string title = "Test Notification"; const string body = "This is a test message from NzbDrone"; + Thread.Sleep(5000); + SendNotification(title, body, "TEST", message.Host, message.Port, message.Password); } }