❓ How do you write unit/integration tests for functionality that depends on a third party API?

We at KROS a.s. use WireMock.NET library, which elegantly allows you to create a mock server, simply define rules for responses and from it create an HTTP client that you can use directly in the test.

It’s simple and elegant. In most cases it doesn’t require any complex configuration.