public void HomeContact() { // Arrange HomeController controller = new HomeController(catalogService.Object); // Act ViewResult result = controller.Contact() as ViewResult; // Assert Assert.IsNotNull(result); }
public async Task HomeIndex() { // Arrange HomeController controller = new HomeController(catalogService.Object); // Act ViewResult result = await controller.Index() as ViewResult; // Assert Assert.IsNotNull(result); HomeViewModel model = result.Model as HomeViewModel; Assert.IsNotNull(model); Assert.AreEqual(3, model.Deals.Count); }