public void Index_HasCorrectModel_SpecialtyList()
        {
            SpecialtyController controller   = new SpecialtyController();
            IActionResult       actionResult = controller.Index();
            ViewResult          view         = controller.Index() as ViewResult;
            var result = view.ViewData.Model;

            Assert.IsInstanceOfType(result, typeof(List <Specialty>));
        }
        public void Index_HasCorrectModelType_SpecialtyList()
        {
            //Arrange
            SpecialtyController controller   = new SpecialtyController();
            IActionResult       actionResult = controller.Index();
            ViewResult          indexView    = controller.Index() as ViewResult;

            //Act
            var result = indexView.ViewData.Model;

            //Assert
            Assert.IsInstanceOfType(result, typeof(List <Specialty>));
        }
Esempio n. 3
0
        public void Index_ReturnsCorrectView_True()
        {
            SpecialtyController controller = new SpecialtyController();
            ActionResult        allView    = controller.Index();

            Assert.IsInstanceOfType(allView, typeof(ViewResult));
        }
        public void Index_ReturnsCorrectView_True()
        {
            //Arrange
            SpecialtyController controller = new SpecialtyController();

            //Act
            ActionResult indexView = controller.Index();

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