代码如下:
IServiceCollection services = new ServiceCollection();var mock = new Mock<IHostingEnvironment>(); mock.Setup(env => env.ContentRootPath).Returns(Directory.GetCurrentDirectory());
请问如何注入IHostingEnvironment的mock实例mock.Object?
GCT1015
相关分类