예제 #1
0
        public void Create_ReturnsCorrectActionType_RedirectToActionResult()
        {
            CounterController controller = new CounterController();

            IActionResult view = controller.Create("hello", "HeLlO world I said hello");

            Assert.IsInstanceOfType(view, typeof(RedirectToActionResult));
        }
예제 #2
0
        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");
        }