public void ProductDelete() { var mockService = new Mock <INorthwindService>(); mockService.Setup(s => s.DeleteProduct(55)); var mockConfiguration = new Mock <IConfiguration>(); var mockLogger = new Mock <ILogger <HomeController> >(); var controller = new HomeController(mockService.Object, mockConfiguration.Object, mockLogger.Object, null); var result = controller.DeleteProduct(55) as RedirectToActionResult; Assert.AreEqual("Products", result.ActionName); }