예제 #1
0
        public void BreedListReturnType()
        {
            DogsController controller = new DogsController();
            var            actual     = controller.Index();

            Assert.IsInstanceOfType(actual, typeof(Task <ActionResult>));
        }
예제 #2
0
            public void Index_ReturnsCorrectView_True()
            {
                //Arrange
                DogsController controller = new DogsController();

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

                //Assert
                Assert.IsInstanceOfType(indexView, typeof(ViewResult));
            }
예제 #3
0
            public void Index_HasCorrectModelType_DogList()
            {
                //Arrange
                DogsController controller = new DogsController();
                ViewResult     indexView  = controller.Index() as ViewResult;

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

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