WireMock if often used to replace an external API dependency mocking its requests and responses, see its wiki for more details nad use cases.
In this project, we are going to focus on how to use it for integration/functional tests, together with dotnet's WebApplicationFactory and some custom code with http delegating handlers to tackle some of the problems associated with these kind of tests.
This is a demo project where we could play and demo some of the capabilities that WireMock provides for creating integration tests that require mocking external APIs. Each integration test project builds on top of the previous to solve a specific issue:
This is the production service, see it's readme for more info.
The simplest way to use WireMock for writing integration tests.
Sometimes a new dependency is added to our service and we forget to mock it for our tests, in this project we show how to avoid having http leaks in your integration tests.
WireMock has a built-in feature that proxies calls to the real APIs and can also record and replay these calls, see how to do it here.
The default way WireMocks stores the recordings has some issues which are explained in this project and we show how to use a more opinionated manual recording strategy.