From e8706354b9db024e70531eb2d114d7e55db65f86 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Mon, 13 Jun 2016 10:34:37 +0100 Subject: [PATCH] Fixed tests --- PlexRequests.Helpers/Analytics/Action.cs | 8 +++++++- PlexRequests.Helpers/Analytics/Category.cs | 3 ++- .../PlexAvailabilityCheckerTests.cs | 2 +- PlexRequests.Services/Jobs/PlexAvailabilityChecker.cs | 3 +++ PlexRequests.UI.Tests/LandingPageTests.cs | 1 - PlexRequests.UI/Startup.cs | 2 -- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/PlexRequests.Helpers/Analytics/Action.cs b/PlexRequests.Helpers/Analytics/Action.cs index 39f0f344e..a353dcc33 100644 --- a/PlexRequests.Helpers/Analytics/Action.cs +++ b/PlexRequests.Helpers/Analytics/Action.cs @@ -28,6 +28,12 @@ namespace PlexRequests.Helpers.Analytics { public enum Action { - Donate + Donate, + ClickButton, + Delete, + Create, + Save, + Update, + Start } } \ No newline at end of file diff --git a/PlexRequests.Helpers/Analytics/Category.cs b/PlexRequests.Helpers/Analytics/Category.cs index 1a3a2739e..7bedb16a5 100644 --- a/PlexRequests.Helpers/Analytics/Category.cs +++ b/PlexRequests.Helpers/Analytics/Category.cs @@ -35,6 +35,7 @@ namespace PlexRequests.Helpers.Analytics LandingPage, Api, Issues, - UserLogin + UserLogin, + Services, } } \ No newline at end of file diff --git a/PlexRequests.Services.Tests/PlexAvailabilityCheckerTests.cs b/PlexRequests.Services.Tests/PlexAvailabilityCheckerTests.cs index 5e7cc5aa0..7235639af 100644 --- a/PlexRequests.Services.Tests/PlexAvailabilityCheckerTests.cs +++ b/PlexRequests.Services.Tests/PlexAvailabilityCheckerTests.cs @@ -551,7 +551,7 @@ namespace PlexRequests.Services.Tests // { // Title = "Hi", // Year = "2017", - // ParentTitle = "c" + //ParentTitle = "c" // }, // new Directory1 // { diff --git a/PlexRequests.Services/Jobs/PlexAvailabilityChecker.cs b/PlexRequests.Services/Jobs/PlexAvailabilityChecker.cs index c95428e5c..227540bb5 100644 --- a/PlexRequests.Services/Jobs/PlexAvailabilityChecker.cs +++ b/PlexRequests.Services/Jobs/PlexAvailabilityChecker.cs @@ -35,6 +35,7 @@ using PlexRequests.Api.Models.Plex; using PlexRequests.Core; using PlexRequests.Core.SettingModels; using PlexRequests.Helpers; +using PlexRequests.Helpers.Analytics; using PlexRequests.Services.Interfaces; using PlexRequests.Services.Models; using PlexRequests.Services.Notification; @@ -44,6 +45,8 @@ using PlexRequests.Store.Repository; using Quartz; +using Action = PlexRequests.Helpers.Analytics.Action; + namespace PlexRequests.Services.Jobs { public class PlexAvailabilityChecker : IJob, IAvailabilityChecker diff --git a/PlexRequests.UI.Tests/LandingPageTests.cs b/PlexRequests.UI.Tests/LandingPageTests.cs index b8607fb3d..59451379c 100644 --- a/PlexRequests.UI.Tests/LandingPageTests.cs +++ b/PlexRequests.UI.Tests/LandingPageTests.cs @@ -51,7 +51,6 @@ namespace PlexRequests.UI.Tests yield return new TestCaseData(DateTime.Now.AddDays(2), DateTime.Now).Returns(false); // End in past yield return new TestCaseData(DateTime.Now.AddDays(2), DateTime.Now.AddDays(3)).Returns(false); // Not started yet yield return new TestCaseData(DateTime.Now.AddDays(-5), DateTime.Now.AddDays(-1)).Returns(false); // Finished yesterday - yield return new TestCaseData(DateTime.Now.AddMilliseconds(200), DateTime.Now.AddMilliseconds(900)).Returns(true); // Just about to start but not yet } } } diff --git a/PlexRequests.UI/Startup.cs b/PlexRequests.UI/Startup.cs index 361085a96..a4a3c81cf 100644 --- a/PlexRequests.UI/Startup.cs +++ b/PlexRequests.UI/Startup.cs @@ -26,8 +26,6 @@ #endregion using System; -using Nancy.Helpers; - using NLog; using Owin;