Beispiel #1
0
        public void Create_ReturnsCorrectActionType_RedirectToActionResuult()
        {
            CdsController controller = new CdsController();
            IActionResult view       = controller.Create("Title goes here");

            Assert.IsInstanceOfType(view, typeof(RedirectToActionResult));
        }
Beispiel #2
0
        public void Create_RedirectsToCorrectAction_Index()
        {
            CdsController          controller   = new CdsController();
            RedirectToActionResult actionResult = controller.Create("Title goes here") as RedirectToActionResult;
            string result = actionResult.ActionName;

            Assert.AreEqual(result, "Index");
        }