你的位置: 码友网首页 / 资讯源列表 / Tips & tricks for unit testing in .NET Core 3: Mocking IHttpContextAccessor

关于[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.

原文地址: http://anthonygiretti.com/2020/02/03/tips-tricks-for-unit-testing-in-net-core-3-mocking-ihttpcontextaccessor/

收录时间: 2020-02-05 浏览量: 2196 分类: .NET Core

| 0 收藏 | 0