A general rule of thumb is to avoid having "fat controllers". My controllers literally have the model or arguments they need to execute against a corresponding service. Ideally, your controller actions are a single call with a lot of attributes that describe the endpoint, consider the following:
public class MyThinController : Controller
{
[
HttpGet,
Route("api/[controller]/foos/{bar}"),
Authorize(Policy = nameof(Policies.StackoverflowOp))
]
public Task<IActionResult> GetFoo([FromRoute] Bar bar,
[FromServices] IExampleService service)
=> service.GetAsync(bar);
}
Then, your only concern should be that given a bar the implementation of IExampleService does correctly get a Foo.
But if you're completely not willing to do it the correct way, there is always a way to do it the wrong way. You're actually looking for the ActionContext.HttpContext which is moq-ready.