public void About_ViewResult_Should_Have_The_Right_Title () { string intendedTitle = "Squarker | About"; var pagesController = new PagesController(); var result = pagesController.About() as ViewResult; string actualTitle = ApplicationHelper.RenderTitle(result.ViewData); Assert.AreEqual(intendedTitle, actualTitle, "About page title was incorrect"); }
public void About_Action_Should_Return_About_View() { //Arrange var pagesController = new PagesController(); //Act var result = pagesController.About() as ViewResult; //Assert Assert.IsNotNull(result, "Should have returned a ViewResult"); Assert.AreEqual("About", result.ViewName, "View should have been About"); }