Interfaces for Client and AsyncClient
alexanderkolbyoshkin opened this issue · comments
How about extracting interfaces from the Client and AsyncClient classes? This would allow to mock them in unit tests without additional wrappers.
The recommended way of mocking HttpClient is... not to mock it. :) Instead, pass a mock implementation of HttpMessageHandler to HttpClient constructor. See https://stackoverflow.com/a/36427274/1291717