I have a question related to Unit testing in android. The app is written in Kotlin, MVVM architecture, Dagger-Hilt, Room, etc… I have written all the tests for Room DAOs, according to official docs. I have created fake repositories so I can test some Managers/Helpers (these classes encapsulate logic I have to reuse in many ViewModels) that handle business logic. Now I need to test ViewModels which have these Managers/Helpers as dependencies. I don’t want to fall into trap of re-testing the same code all over again, the question is how to test ViewModels? Should I only test the parameters that are passed to functions in these Managers/Helpers, and write assertions for that, or what to do?
Thanks in advance!