mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Unit testing for external API #442
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kiquenet on GitHub (Aug 31, 2022).
How-to do unit testing for external API (like Fake API ) api.chucknorris.io ?
simple-example-of-calling-rest-api-with-httpclient-in-net5.0
@StefH commented on GitHub (Aug 31, 2022):
Please see https://github.com/WireMock-Net/WireMock.Net/wiki/Using-WireMock-in-UnitTests
In your case
@StefH commented on GitHub (Sep 1, 2022):
@kiquenet is this clear?
@kiquenet commented on GitHub (Sep 1, 2022):
Only useful references:
HttpClient and testing
https://adamstorr.azurewebsites.net/blog/test-your-dotnet-httpclient-based-strongly-typed-clients-like-a-boss
IHttpClientFactory vs HttpClient
https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests
YOU'RE USING HTTPCLIENT WRONG AND IT IS DESTABILIZING YOUR SOFTWARE
@StefH commented on GitHub (Sep 1, 2022):
Thanks for these references, I know these, but this is not really applicable to WireMock.Net, it;s more applicable to the client code which calls the external api / calls WireMock.Net