public void IndexViewResultNotNull() { // Arrange TESTController controller = new TESTController(); // Act ViewResult result = controller.Index() as ViewResult; // Assert Assert.NotNull(controller); }
public void IndexViewNameEqualIndex() { // Arrange TESTController controller = new TESTController(); // Act ViewResult result = controller.Index() as ViewResult; // Assert Assert.Equal("Index", result?.ViewName); }
public void IndexViewDataMessage() { // Arrange TESTController controller = new TESTController(); // Act ViewResult result = controller.Index() as ViewResult; // Assert Assert.Equal("For testing", result?.ViewBag.Message); }