Chris Sainty 2/8/2018

Unit Testing with the HttpClient

Read Original

This technical article provides a guide to unit testing with the HttpClient class in C#. It demonstrates a common problem and offers three solutions, starting with wrapping HttpClient in a custom interface (IHttpProvider) to enable mocking and improve testability of services like the example SongService.

Unit Testing with the HttpClient

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week