public void ListAction_WhenSurveyCompleted_ExpectPost() { //Arrange var fakeComplete = new List <SurveyModel>() { new SurveyModel { ParkCode = "CVNP", EmailAddress = "*****@*****.**", PhysicalActivityLevel = "Sedentary", StateOfResidence = "Alabama", NumberOfVotes = 2 }, new SurveyModel { ParkCode = "GTNP", EmailAddress = "*****@*****.**", PhysicalActivityLevel = "Inactive", StateOfResidence = "Illinois", NumberOfVotes = 4 } }; // Mock the dal Mock <ISurveyDAL> mockDal = new Mock <ISurveyDAL>(); //Set up the mock object mockDal.Setup(s => s.GetAllSurveys()).Returns(fakeComplete); SurveyController controller = new SurveyController(mockDal.Object); //Act var result = controller.DisplaySurvey() as ViewResult; //Assert Assert.AreEqual("DisplaySurvey", result.ViewName); Assert.IsNotNull(result.Model); }