throw new HttpResponseException(HttpStatusCode.BadRequest);
var provider = await Request.Content.ReadAsMultipartAsync<InMemoryMultipartFormDataStreamProvider>(new InMemoryMultipartFormDataStreamProvider());
1 Answer, 1 is accepted
answered on 29 Sep 2014, 10:28 AM
It appears that you're mixing future mocking (IgnoreInstance) with async tests. A future or static arrangement works across threads only when you add the .OnAllThreads() clause to the arrangement, i.e.:
Future or static mocking across threads is dangerous when you mock framework classes. Doing so could potentially destabilize the testing framework itself. Since you're mocking a non-framework class here, there should be no problem.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.