Android-CleanArchitecture
Android-CleanArchitecture copied to clipboard
How to test your views?
I didn't see any unit tests for the Fragments. How do you inject a mockPresenter into your fragment to test it?
Because I'm not interested in testing views, specially because tests are code to maintain, and what solves really my problem is both domain and logic layer.
In any case, this is a matters of taste and personal opinion, if you want to do it, just create a constructor in the fragment that satisfies all dependencies, then you can instantiate as any other class or override de module using dagger and inject mock objects instead of real implementations of your collaborators.