Refactor invoker tests for reuse
This commit is contained in:
parent
b7db6dbc8e
commit
e7bd6cfc06
|
|
@ -47,6 +47,9 @@ namespace Microsoft.AspNetCore.Mvc.Internal
|
|||
_controllerContext = controllerContext;
|
||||
}
|
||||
|
||||
// Internal for testing
|
||||
internal ControllerContext ControllerContext => _controllerContext;
|
||||
|
||||
protected override void ReleaseResources()
|
||||
{
|
||||
if (_controller != null && _cacheEntry.ControllerReleaser != null)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -248,15 +248,15 @@ namespace Microsoft.AspNetCore.Mvc.Internal
|
|||
|
||||
if (actionThrows)
|
||||
{
|
||||
actionDescriptor.MethodInfo = typeof(ControllerActionInvokerTest).GetMethod(
|
||||
nameof(ControllerActionInvokerTest.ThrowingActionMethod));
|
||||
actionDescriptor.MethodInfo = typeof(ControllerActionInvokerTest.TestController).GetMethod(
|
||||
nameof(ControllerActionInvokerTest.TestController.ThrowingActionMethod));
|
||||
}
|
||||
else
|
||||
{
|
||||
actionDescriptor.MethodInfo = typeof(ControllerActionInvokerTest).GetMethod(
|
||||
nameof(ControllerActionInvokerTest.ActionMethod));
|
||||
actionDescriptor.MethodInfo = typeof(ControllerActionInvokerTest.TestController).GetMethod(
|
||||
nameof(ControllerActionInvokerTest.TestController.ActionMethod));
|
||||
}
|
||||
actionDescriptor.ControllerTypeInfo = typeof(ControllerActionInvokerTest).GetTypeInfo();
|
||||
actionDescriptor.ControllerTypeInfo = typeof(ControllerActionInvokerTest.TestController).GetTypeInfo();
|
||||
|
||||
return CreateInvoker(filters, actionDescriptor, _controller);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue