mardi 1 septembre 2015

How to mock a webapi controller that has actions that return Task

I am trying to refactor an Asp.Net MVC Single-Page app. WebApi used to be the service layer but due to some issues with authentication I had to change it to a direct reference. The WebApi project has the UnitTests but the MVC app doesn't.

I am struggling to mock [using Moq] the Task<IHttpActionResult> types the WebApi returns.

Aucun commentaire:

Enregistrer un commentaire