public void IndexViewLoads() { //Act ViewResult result = songController.Index() as ViewResult; //Assert Assert.AreEqual("Index", result.ViewName); }
public void Index() { // Arrange SongsController _controller = new SongsController(); // Act ViewResult result = _controller.Index() as ViewResult; // Assert NUnit.Framework.Assert.IsNotNull(result); NUnit.Framework.Assert.AreSame(result.ViewData["Message"], "I made this project to keep track of songs that I have."); }