I decided that it's time to automate some tests, and I wanted to start using Espresso. I was following few tutorials, but I am not able to make it work in my app because of my architecture.
My app is following MVVM architecture, and I am using Hilt for dependency injection. My idea is to mock (using Mockk) the ViewModel to be able to control the flows and the data, but I am not getting how to do it, and when I run the test, the real ViewModel is being called.
This is an example of how I instantiate my ViewModel in my fragment:
Anybody could help me with it? I would be super thankful!
