From 3c1f3c94e9823a0b08614ddcefb881724819bd12 Mon Sep 17 00:00:00 2001 From: Youngjune Hong Date: Mon, 4 May 2015 16:03:31 -0700 Subject: [PATCH] Fixing a build break by adding ISystemClock services to the E2E startup --- .../Areas/Admin/Controllers/StoreManagerController.cs | 2 +- src/MusicStore/StartupNtlmAuthentication.cs | 4 ++++ src/MusicStore/StartupOpenIdConnect.cs | 4 ++++ test/E2ETests/compiler/shared/Mocks/StartupSocialTesting.cs | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/MusicStore/Areas/Admin/Controllers/StoreManagerController.cs b/src/MusicStore/Areas/Admin/Controllers/StoreManagerController.cs index 820a4f34a8..c54efa9a63 100644 --- a/src/MusicStore/Areas/Admin/Controllers/StoreManagerController.cs +++ b/src/MusicStore/Areas/Admin/Controllers/StoreManagerController.cs @@ -208,7 +208,7 @@ namespace MusicStore.Areas.Admin.Controllers return HttpNotFound(); } - return new ContentResult { Content = album.AlbumId.ToString(), ContentType = "text/plain" }; + return new ContentResult { Content = album.AlbumId.ToString() }; } #endif } diff --git a/src/MusicStore/StartupNtlmAuthentication.cs b/src/MusicStore/StartupNtlmAuthentication.cs index 9b0f026784..e6056ce5fb 100644 --- a/src/MusicStore/StartupNtlmAuthentication.cs +++ b/src/MusicStore/StartupNtlmAuthentication.cs @@ -12,6 +12,7 @@ using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Logging; using Microsoft.Framework.Runtime; using Microsoft.Net.Http.Server; +using MusicStore.Components; using MusicStore.Models; namespace MusicStore @@ -73,6 +74,9 @@ namespace MusicStore services.AddCaching(); services.AddSession(); + // Add the system clock service + services.AddSingleton(); + // Configure Auth services.Configure(options => { diff --git a/src/MusicStore/StartupOpenIdConnect.cs b/src/MusicStore/StartupOpenIdConnect.cs index 6a9e43f305..6c10b3f9a4 100644 --- a/src/MusicStore/StartupOpenIdConnect.cs +++ b/src/MusicStore/StartupOpenIdConnect.cs @@ -10,6 +10,7 @@ using Microsoft.Framework.ConfigurationModel; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Logging; using Microsoft.Framework.Runtime; +using MusicStore.Components; using MusicStore.Models; namespace MusicStore @@ -98,6 +99,9 @@ namespace MusicStore services.AddCaching(); services.AddSession(); + // Add the system clock service + services.AddSingleton(); + // Configure Auth services.Configure(options => { diff --git a/test/E2ETests/compiler/shared/Mocks/StartupSocialTesting.cs b/test/E2ETests/compiler/shared/Mocks/StartupSocialTesting.cs index 11220300de..f2bf0aea6a 100644 --- a/test/E2ETests/compiler/shared/Mocks/StartupSocialTesting.cs +++ b/test/E2ETests/compiler/shared/Mocks/StartupSocialTesting.cs @@ -15,6 +15,7 @@ using Microsoft.Framework.ConfigurationModel; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.Logging; using Microsoft.Framework.Runtime; +using MusicStore.Components; using MusicStore.Mocks.Common; using MusicStore.Mocks.Facebook; using MusicStore.Mocks.Google; @@ -159,6 +160,9 @@ namespace MusicStore services.AddCaching(); services.AddSession(); + // Add the system clock service + services.AddSingleton(); + // Configure Auth services.Configure(options => {