public void BreedListReturnType() { DogsController controller = new DogsController(); var actual = controller.Index(); Assert.IsInstanceOfType(actual, typeof(Task <ActionResult>)); }
public void Index_ReturnsCorrectView_True() { //Arrange DogsController controller = new DogsController(); //Act ActionResult indexView = controller.Index(); //Assert Assert.IsInstanceOfType(indexView, typeof(ViewResult)); }
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>)); }