I was testing a filter that accessed the request and the response on the OnActionExecuted method. In order to setup the request on the HttpActionExecutedContext for my test I had to write all this code:
```
HttpControllerContext controllerContext = new HttpControllerContext();
controllerContext.Request = request;
HttpActionDescriptor descriptor = new ReflectedHttpActionDescriptor();
HttpActionContext actionContext = new HttpActionContext(controllerContext, descriptor);
HttpActionExecutedContext context = new HttpActionExecutedContext(actionContext, null);
```
As a customer I would prefer to have mocked the HttpActionExecutedContext to provide my test request. We should consider adding a setter on the Request property or making it virtual in order to let the user avoid writing the above code.
Comments: Make sure the ActionContext and HttpActionExecuted mockable for filter unit testing
```
HttpControllerContext controllerContext = new HttpControllerContext();
controllerContext.Request = request;
HttpActionDescriptor descriptor = new ReflectedHttpActionDescriptor();
HttpActionContext actionContext = new HttpActionContext(controllerContext, descriptor);
HttpActionExecutedContext context = new HttpActionExecutedContext(actionContext, null);
```
As a customer I would prefer to have mocked the HttpActionExecutedContext to provide my test request. We should consider adding a setter on the Request property or making it virtual in order to let the user avoid writing the above code.
Comments: Make sure the ActionContext and HttpActionExecuted mockable for filter unit testing