//public void Index() public async Task CheckIfRetunIndexView() { // Arrange HomeController controller = new HomeController(); // Act ViewResult result = await controller.Index() as ViewResult; // Assert Assert.IsNotNull(result); }
//public void Index() public async Task Index() { // Arrange HomeController controller = new HomeController(); // Act ViewResult result = await controller.Index() as ViewResult; var liftOffer = (LiftOffer)result.ViewData.Model; // Assert Assert.AreEqual(6, liftOffer.LiftOfferID); }