Unit testing controllers with [Authorize] attribute in ASP.NET core

The Problem: Looking to unit test an [HttpPost] method in an [Authorize]d API controller I ran into a predicament.  My method has references to this.User and I found myself needing to mock the current user/claims principal.  I  looked through the API and nothing worked, this.User is read-only.  I looked at the https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/testing and there were no suggestions other … Continue reading Unit testing controllers with [Authorize] attribute in ASP.NET core