关于[Tips & tricks for unit testing in .NET Core 3: Mocking IHttpContextAccessor]的摘要:
I wanted to write this article because I recently came across an interesting test case. This involved testing a factory that selected a service instance in the DI system from a service name. To be able to test this case, I had to mock the IHttpContextAccessor interface and a little bit more … Let’s see how I did it.