public void ReturnViewForIndexWithoutVendors() { _mockVendorRepo.Setup(x => x.GetAll()).Returns(new List <Vendor>()); _sut = new VendorsController(_mockVendorRepo.Object); IActionResult result = _sut.Index(); Assert.IsType <ViewResult>(result); }
public void Index() { // Arrange VendorsController controller = new VendorsController(); // Act ViewResult result = controller.Index() as ViewResult; // Assert Assert.AreEqual("VENDORS", result.ViewBag.Message); }