代码如下:
IServiceCollection services = new ServiceCollection();var mock = new Mock<IHostingEnvironment>(); mock.Setup(env => env.ContentRootPath).Returns(Directory.GetCurrentDirectory());
请问如何注入IHostingEnvironment的mock实例mock.Object?
守候你守候我
GCT1015
随时随地看视频慕课网APP