public void InvokeAction_OverrideFindAction() { // Arrange ControllerContext controllerContext = GetControllerContext(); AsyncControllerActionInvoker invoker = new AsyncControllerActionInvokerWithCustomFindAction(); // Act IAsyncResult asyncResult = invoker.BeginInvokeAction(controllerContext, actionName: "Non-ExistantAction", callback: null, state: null); bool retVal = invoker.EndInvokeAction(asyncResult); // Assert Assert.True(retVal); Assert.Equal("From action", ((TestController)controllerContext.Controller).Log); }
public void InvokeAction_OverrideFindAction() { // Arrange ControllerContext controllerContext = GetControllerContext(); AsyncControllerActionInvoker invoker = new AsyncControllerActionInvokerWithCustomFindAction(); // Act IAsyncResult asyncResult = invoker.BeginInvokeAction(controllerContext, actionName: "Non-ExistantAction", callback: null, state: null); bool retVal = invoker.EndInvokeAction(asyncResult); // Assert Assert.True(retVal); Assert.Equal("From action", ((TestController)controllerContext.Controller).Log); }