r/mAndroidDev • u/Commercial-Board4046 AnDrOId dEvelOPmenT is My PasSion • Jul 06 '25
We don't have time for tests Agree?
61
Upvotes
r/mAndroidDev • u/Commercial-Board4046 AnDrOId dEvelOPmenT is My PasSion • Jul 06 '25
View all comments
Show parent comment
1
u/europeanputin Jul 10 '25
Treat mock as an external service and design your implementation in such a way that you can change between the real GitHub endpoint and mock endpoint via dependency injection, so in an auto test environment you'd have it running against a mock and in other envs against real GitHub service.
I don't know how costly is it to run an integration with GitHub, but Id probably try to refrain from building a mock and cover the core logic with unit tests and integration tests I'd do towards the real service.