public void Create_ReturnsCorrectActionType_RedirectToActionResult() { CounterController controller = new CounterController(); IActionResult view = controller.Create("hello", "HeLlO world I said hello"); Assert.IsInstanceOfType(view, typeof(RedirectToActionResult)); }
public void Create_RedirectsToCorrectAction_Index() { CounterController controller = new CounterController(); RedirectToActionResult actionResult = controller.Create("hello", "HeLlO world I said hello") as RedirectToActionResult; string result = actionResult.ActionName; Assert.AreEqual(result, "Index"); }