[Question] Testing Web API Wrappers

Hi all,

I’m trying to figure out how to properly integration test my managed wrappers over the HttpClient class. Unit testing the things that depend on these wrappers is easy enough (you just mock the whole dependency), but I’d really like to be able to contact that actual endpoint that the client will be using in the wild. The expected benefit of doing this, for me, is:

  1. Enable me to verify routes are being published properly
  2. Validate that authentication are working correctly
  3. Ensure that the dependency injection configuration doesn’t have any holes
  4. And other integration test objectives

Does anyone have any frameworks or methods they are using to support this use-case. Would you mind sharing?

Thanks!

submitted by /u/bizcs
[link] [comments]

Leave a Reply