TwitchLib.Api icon indicating copy to clipboard operation
TwitchLib.Api copied to clipboard

Making the Api library testable

Open LuckyNoS7evin opened this issue 6 years ago • 2 comments

So the Api is not really testable at the moment due to its dependency on HttpClient (>2.0) and WebRequest (<2.0)

Therefore I propose the following:-

  1. Break out the actual calls made into a different class
  2. create an interface
  3. profit

With the aim of making the Api more DI friendly this would mean a new constructor value in which a "HttpCallHandler" can be injected

LuckyNoS7evin avatar Apr 07 '18 23:04 LuckyNoS7evin

We should probably create an issue for each section so that people can work on these independant of eachother. I know there is a pr out there setting the baseline for this.

jaybyrrd avatar Jul 05 '18 13:07 jaybyrrd

good shout, at the moment we have a few helix ones in there...

LuckyNoS7evin avatar Jul 05 '18 13:07 LuckyNoS7evin