I am writing test cases using the Unit Test for ASP.NET Web API.
Now I have an action which makes a call to some method I have defined in the service layer, where I
With WebApi 5.0 this is slightly different. You can now do:
controller.User = new ClaimsPrincipal( new GenericPrincipal(new GenericIdentity("user"), null));