public void Create_ReturnsCorrectActionType_RedirectToActionResult()
        {
            SpecialtiesController controller = new SpecialtiesController();
            IActionResult         view       = controller.Create("cat");

            Assert.IsInstanceOfType(view, typeof(RedirectToActionResult));
        }
        public void Create_RedirectsToCorrectAction_Index()
        {
            SpecialtiesController  controller   = new SpecialtiesController();
            RedirectToActionResult actionResult = controller.Create("ducktail") as RedirectToActionResult;
            string result = actionResult.ActionName;

            Assert.AreEqual(result, "Index");
        }
Пример #3
0
        public void Create_ReturnsCorrectActionType_ViewResult()
        {
            //Arrange
            SpecialtiesController controller = new SpecialtiesController();

            //Act
            IActionResult view = controller.Create("Colorist");

            //Assert
            Assert.IsInstanceOfType(view, typeof(ViewResult));
        }