PreviousNext

Create fake user for ASP.NET Core controller tests

by bill-s, 2020-01-16T16:17:12.578Z

I think most of ASP.NET Core applications have authentication enabled. When writing unit tests for controllers we have one set of tests that need authenticated user and other set of tests that need anonymous user. Faking User property of controller is a little bit tricky. This blog post shows how to do it.

Read More