Exemple #1
0
        public void DetailFound()
        {
            // Arrange
            NotFoundController controller = new NotFoundController();

            // Act
            var result = controller.Error() as ViewResult;

            // Assert
            Assert.AreEqual("Error", result.ViewName);
            // return IViewPageActivator()
        }
Exemple #2
0
    public bool InvokeAction(ControllerContext controllerContext, string actionName)
    {
        if (actionInvoker.InvokeAction(controllerContext, actionName))
        {
            return(true);
        }

        // No action method was found.
        var controller = new NotFoundController();

        controller.ExecuteNotFound(controllerContext.RequestContext);

        return(true);
    }