im kind of struggle how i can replace the OkHttpClient with MockWebServer. OkHttpClient and MockWebserver not sharing any common interface/class.
How do you mock the Server in a situation when the OkHttpClient gets created my Dagger or Koin ? I would expect that i have to override the dagger/koin module to get it to work.
But that seem not to be the case in all examples i looked at. Those examples deal with MockWebserver directly ... In my scenario i would like to setup the MockWebSever with a couple of responses and pass those to Dagger/Koin to have my Android Test using it transparent behind the scenes. Anyone can share some example ?
cheers
Aucun commentaire:
Enregistrer un commentaire