Mocking HttpContext in ASPNET Core
If you have been developing web apps with C# and the .NET framework for any length of time, chances are, you are familiar with the following code snippet.
var userName = HttpContext.Current.User.Identity.Name;
The code is simple. We've received a web...