Hey great article , it’s extremely thorough and I’m glad you show the testing side of dagger that is ultimately the best part about using a DI framework.
I’m confused about your implementations of Retrofit and OkHTTP. Are these classes named this way signal that fact that we would be using these libraries inside of them . Because being able to extend Retrofit isn’t possible , its a final class.
How might this actually look if we were infact using OKHttp and Retrofit instead of these mock classes, because extending and overriding methods isn’t possible . Using a mocking framework like mockito to mock retrofit’s return calls seems to be the solution instead .
Can you explain how you might do this using a real implementation of Retrofit and OkHttp.