Sources

DD Dennis Doomen
Blog

1stories
Oct 26latest
Mockly
Fluent HTTP mocks
DDDennis Doomen Dennis Doomen Oct 26

Mockly: fluent HTTP mocking for .NET tests that call HttpClient

Dennis Doomen released Mockly, an open-source library that makes testing code which calls HttpClient much simpler. It replaces hand-written HttpMessageHandler subclasses and fragile Moq setups on the protected SendAsync method. Its main strength is that failure paths such as retries, timeouts, 401 refreshes and 429 throttling can be simulated in a line or two, and unmatched requests produce a clear explanation.

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message