コード例 #1
0
        public void Details_ReturnsCorrectView_True()
        {
            SpecialtiesController controller   = new SpecialtiesController();
            IActionResult         actionResult = controller.Details(1);
            ViewResult            result       = controller.Details(1) as ViewResult;

            Assert.IsInstanceOfType(result, typeof(ViewResult));
        }
コード例 #2
0
        public void Details_ReturnsCorrectModelType_Specialty()
        {
            SpecialtiesController controller   = new SpecialtiesController();
            IActionResult         actionResult = controller.Details(1);
            ViewResult            indexView    = controller.Details(1) as ViewResult;

            var result = indexView.ViewData.Model;

            Assert.IsInstanceOfType(result, typeof(Specialty));
        }
コード例 #3
0
        public void Details_ReturnsCorrectView_True()
        {
            SpecialtiesController controller  = new SpecialtiesController();
            ActionResult          detailsView = controller.Details(0);

            Assert.IsInstanceOfType(detailsView, typeof(ViewResult));
        }
コード例 #4
0
        public void Details_ReturnsCorrectView_True()
        {
            //Arrange
            SpecialtiesController controller = new SpecialtiesController();

            //Act
            ActionResult indexView = controller.Details(1);

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