From 3574b1d9819f3e545f1b294c7c82998fd8d99d2e Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Fri, 19 Feb 2016 11:28:25 -0800 Subject: [PATCH] Reacting to MVC's action result naming changes --- .../Areas/Admin/Controllers/StoreManagerController.cs | 10 +++++----- src/MusicStore/Controllers/StoreController.cs | 4 ++-- test/MusicStore.Test/StoreControllerTest.cs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/MusicStore/Areas/Admin/Controllers/StoreManagerController.cs b/src/MusicStore/Areas/Admin/Controllers/StoreManagerController.cs index 917038a426..059c5c6714 100644 --- a/src/MusicStore/Areas/Admin/Controllers/StoreManagerController.cs +++ b/src/MusicStore/Areas/Admin/Controllers/StoreManagerController.cs @@ -66,7 +66,7 @@ namespace MusicStore.Areas.Admin.Controllers if (album == null) { cache.Remove(cacheKey); - return HttpNotFound(); + return NotFound(); } return View(album); @@ -119,7 +119,7 @@ namespace MusicStore.Areas.Admin.Controllers if (album == null) { - return HttpNotFound(); + return NotFound(); } ViewBag.GenreId = new SelectList(DbContext.Genres, "GenreId", "Name", album.GenreId); @@ -157,7 +157,7 @@ namespace MusicStore.Areas.Admin.Controllers var album = await DbContext.Albums.Where(a => a.AlbumId == id).FirstOrDefaultAsync(); if (album == null) { - return HttpNotFound(); + return NotFound(); } return View(album); @@ -174,7 +174,7 @@ namespace MusicStore.Areas.Admin.Controllers var album = await DbContext.Albums.Where(a => a.AlbumId == id).FirstOrDefaultAsync(); if (album == null) { - return HttpNotFound(); + return NotFound(); } DbContext.Albums.Remove(album); @@ -203,7 +203,7 @@ namespace MusicStore.Areas.Admin.Controllers if (album == null) { - return HttpNotFound(); + return NotFound(); } return Content(album.AlbumId.ToString()); diff --git a/src/MusicStore/Controllers/StoreController.cs b/src/MusicStore/Controllers/StoreController.cs index e3c21e345a..7cdb033238 100644 --- a/src/MusicStore/Controllers/StoreController.cs +++ b/src/MusicStore/Controllers/StoreController.cs @@ -38,7 +38,7 @@ namespace MusicStore.Controllers if (genreModel == null) { - return HttpNotFound(); + return NotFound(); } return View(genreModel); @@ -70,7 +70,7 @@ namespace MusicStore.Controllers if (album == null) { - return HttpNotFound(); + return NotFound(); } return View(album); diff --git a/test/MusicStore.Test/StoreControllerTest.cs b/test/MusicStore.Test/StoreControllerTest.cs index 001933e8e9..bd275ed83f 100644 --- a/test/MusicStore.Test/StoreControllerTest.cs +++ b/test/MusicStore.Test/StoreControllerTest.cs @@ -57,7 +57,7 @@ namespace MusicStore.Controllers var result = await controller.Browse(string.Empty); // Assert - Assert.IsType(result); + Assert.IsType(result); } [Fact] @@ -96,7 +96,7 @@ namespace MusicStore.Controllers var result = await controller.Details(_serviceProvider.GetRequiredService(), albumId); // Assert - Assert.IsType(result); + Assert.IsType(result); } [Fact]