I updated to the final version of MVC4 and now my tests are failing with this error:
System.MissingMethodException : Method not found: 'Void System.Net.Http.ObjectContent`1..ctor(!0, System.Net.Http.Formatting.MediaTypeFormatter, System.Net.Http.Headers.MediaTypeHeaderValue)'.
at System.Net.Http.HttpRequestMessageExtensions.CreateResponse(HttpRequestMessage request, HttpStatusCode statusCode, T value, HttpConfiguration configuration)
On my unit test I have (it was working with RC version):
var configuration = new HttpConfiguration();
var request = new HttpRequestMessage();
var controller = ClassUnderTest;
controller.Request = request;
controller.Request.Properties["MS_HttpConfiguration"] = configuration;
When I run my test I have the exception on this line of code inside the controller:
return Request.CreateResponse(HttpStatusCode.Created, myObj);
I tried different things but I could not fix the tests. Any ideas?