avivbiton / BlizzardApiReader

.Net Core library to handle Blizzard public APIs
MIT License
35 stars 36 forks source link

Interfaces. Unit test example #17

Closed tom-val closed 5 years ago

tom-val commented 5 years ago

I extracted web client so separate class so it's possible to mock returned data. It's still not ideal, and ApiReader should probably get updated too, but it should work for now

avivbiton commented 5 years ago

Is the interface for the diablo api really necessary? it kinda looks over the top and I feel like there is nothing much the mock here.
Tests looks good, at first I thought you are calling the real api but after a closer look it doesn't. nice

Also, look at the development branch, I did some changes to ApiReader so this pull request may not merge well with the changes (Will look at this later)

tom-val commented 5 years ago

I added diablo api interface in case you'd want to inject it, but since it's currently not really possible maybe it doesn't make too much sense.

It says that there are no conflicts, so it's probably fine, but I can check during the weekend if that's the case

avivbiton commented 5 years ago

Which the new changes @linahanner made, can you maybe just copy the unit tests and the changes you made since there are some conflicting files at the moment.

tom-val commented 5 years ago

Sure, I'll solve conflicts tomorrow and look if changes are still necessary

avivbiton commented 5 years ago

Since this is getting old, I will close this for now, When you have time, we'd be happy to have you continue to contribute to the library @smikis