FMFraz Mahmudinblog.frazmahmud.dev·Apr 18, 2021 · 5 min readMocking HttpContext in ASPNET CoreIf 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...01N