コード例 #1
0
        public void Index_HasCorrectModelType_StylistList()
        {
            StylistsController controller   = new StylistsController();
            ActionResult       actionResult = controller.Index();
            ViewResult         indexView    = controller.Index() as ViewResult;
            var result = indexView.ViewData.Model;

            Assert.IsInstanceOfType(result, typeof(List <Stylist>));
        }
コード例 #2
0
        public void Index_ReturnsCorrectView_True()
        {
            StylistsController controller = new StylistsController();
            ActionResult       indexView  = controller.Index();

            Assert.IsInstanceOfType(indexView, typeof(ViewResult));
        }
コード例 #3
0
        public void Index_Of_Stylist()
        {
            StylistsController controller = new StylistsController();

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

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

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

            //Assert
            Assert.IsInstanceOfType(indexView, typeof(ViewResult));
        }
コード例 #5
0
        public void Index_ReturnsCorrectView_View()
        {
            //Arrange
            StylistsController controller = new StylistsController();

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

            //Assert
            Assert.IsInstanceOfType(indexView, typeof(ViewResult));
        }
コード例 #6
0
        public void Index_ReturnView_True()
        {
            StylistsController controller = new StylistsController();


            IActionResult indexView = controller.Index();
            ViewResult    test      = indexView as ViewResult;


            Assert.IsInstanceOfType(test, typeof(ViewResult));
        }
コード例 #7
0
        public void Index_ReturnIfView_True()
        {
            //arrange
            StylistsController controller = new StylistsController();

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

            //assert
            Assert.IsInstanceOfType(result, typeof(ViewResult));
        }
コード例 #8
0
        public void Index_HasCorrectModelType_Results()
        {
            //Arrange
            StylistsController controller   = new StylistsController();
            ViewResult         costDataType = controller.Index() as ViewResult;

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

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