public void Delete_DeleteConfirmed_success() { // Arrange ProductManagerController controller = new ProductManagerController(); // Act // var redirectToRouteResult = controller.Delete(1083) as RedirectToRouteResult; ViewResult result = controller.DeleteConfirmed(34) as ViewResult; // Assert Assert.IsNotNull(result); }
public void Delete_DeleteConfirmed_success2() { // Arrange ProductManagerController controller = new ProductManagerController(); // Act // var redirectToRouteResult = controller.Delete(1083) as RedirectToRouteResult; var redirectToRouteResult = controller.DeleteConfirmed(89) as RedirectToRouteResult; // Assert Assert.AreEqual("Index", redirectToRouteResult.RouteValues["Action"]); // Assert.AreEqual("Account", redirectToRouteResult.RouteValues["controller"]); }