public void NotFound_NoNotFoundPageSet() { // Setup var notFoundPage = new TextPage(); _homeController.CurrentItem = new StartPage(); // Execute var result = _homeController.NotFound(); // Verify Assert.That(result is ContentResult); }
public void NotFound() { // Setup var notFoundPage = new TextPage(); _homeController.CurrentItem = new StartPage() { NotFoundPage = notFoundPage }; // Execute var result = _homeController.NotFound(); // Verify Assert.That(result is ViewPageResult); Assert.That(((ViewPageResult)result).Page, Is.EqualTo(notFoundPage)); }