Categories
ASP.NET MVC Test Driven Development

Mocking HttpContext when testing IActionFilters in MVC

While trying to figure out how to make a full featured implementation of ContextMock builder based solely on Moq in order to make unit tests for an implementation of IActionFilter I stumbled upon a problem :

System.NotSupportedException Invalid setup on a non-virtual (overridable in VB) member: x => x.Values