public void Index_ReturnsCorrectView_True()
        {
            SpecialtiesController controller = new SpecialtiesController();
            ActionResult          indexView  = controller.Index();

            Assert.IsInstanceOfType(indexView, typeof(ViewResult));
        }
        public void Index_HasCorrectModelType_SpecialtyList()
        {
            SpecialtiesController controller = new SpecialtiesController();
            ViewResult            indexView  = controller.Index() as ViewResult;
            var result = indexView.ViewData.Model;

            Assert.IsInstanceOfType(result, typeof(List <Specialty>));
        }
        public void Index_ReturnsCorrectView_View()
        {
            //Arrange
            SpecialtiesController controller = new SpecialtiesController();

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

            //Assert
            Assert.IsInstanceOfType(indexView, typeof(ViewResult));
        }
Beispiel #4
0
        public void Details_ReturnIfView_True()
        {
            //arrange
            SpecialtiesController controller = new SpecialtiesController();

            //act
            IActionResult detailsView = controller.Index();
            ViewResult    result      = detailsView as ViewResult;

            //assert
            Assert.IsInstanceOfType(result, typeof(ViewResult));
        }
Beispiel #5
0
        public void Index_HasCorrectModelType_Results()
        {
            //Arrange
            SpecialtiesController controller   = new SpecialtiesController();
            ViewResult            costDataType = controller.Index() as ViewResult;

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

            //Assert
            Assert.IsInstanceOfType(result, typeof(List <Specialty>));
        }