代码如下:IServiceCollection services = new ServiceCollection();var mock = new Mock<IHostingEnvironment>();
mock.Setup(env => env.ContentRootPath).Returns(Directory.GetCurrentDirectory());请问如何注入IHostingEnvironment的mock实例mock.Object?
- 1 回答
- 0 关注
- 879 浏览
添加回答
举报
0/150
提交
取消