Hi Saeed jan, Thanks for sharing your thoughts. What do you think about creating a separate class for calling the API, along with a related interface, and then injecting it into the main class? This way, we could test our code without worrying about unrelated concerns.
Thanks Masoud jan, actually that's a great idea! So by having a separate interface let's call it IGithubUserService and then mock the interface? I think that would be better and more efficient!
❤❤❤
Thanks ❣️
Hi Saeed jan,
Thanks for sharing your thoughts.
What do you think about creating a separate class for calling the API, along with a related interface, and then injecting it into the main class? This way, we could test our code without worrying about unrelated concerns.
Thanks Masoud jan, actually that's a great idea!
So by having a separate interface let's call it IGithubUserService and then mock the interface?
I think that would be better and more efficient!