admin管理员组文章数量:1333210
Note that I am a novice when it comes to programming.
I have an issue where I want to create an integration test for my service.
The service does several external API-calls. Which is why I wanted to use WireMock.Net to mock the responses.
Since I want to test the whole stack from controller and pass all the API-calls, I created an httpclient via my WebApplicationFactory. Reason for this is that I do not want to mock a response for the first API-call, only the external API-calls.
It works fine from here, but!
When I install the WireMock. the first httpclient fails with status 500. Eventhough I explicitly tells the WireMock.Net only to listen to a specific URL which is not used by my factory httpclient. This also is true if I remove all codes related to WireMock.Net.
So it feels like the NuGet package itself disrupts the standard httpclient?
Any suggestions on why this happens?
本文标签: mockingWireMockNet 168 overides IHttpFactoryCreateClient()Stack Overflow
版权声明:本文标题:mocking - WireMock.Net 1.6.8 overides IHttpFactory.CreateClient()? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742275301a2445081.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论