morpher-ru / Yandex.Checkout.V3

.NET-клиент для Яндекс.Кассы

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

commented

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