阅读背景:

如何在ASP.NET Core测试中存根/模拟服务

来源:互联网 

I'd like to test some classes that are part of ASP.NET Web Api project. I don't need request-response integration tests via TestServer (though they're nice) but I want to keep my tests as close to "real thing" as possible. So I want to resolve my classes using services added in Startup but changing some of them by stubs/mocks on test basis (some tests need mocks, others - don't).I'd like to test some classes that are part of




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: