Mocking HttpClient SendAsync method
Previously I showed how to log all HttpClient outgoing requests. I later added some logics for adding default headers in the SendAsync method in OutgoingHttpClient. I wanted to unit test this to make sure my logic is correct. I thought I could mock the HttpClient the normal way but since the SendAsync method in HttpClient is not virtual, I get … [Read more…]