Hi, if i did want to write activity/fragment tests...
# orbit-mvi
r
Hi, if i did want to write activity/fragment tests, whats the best way? Mock the viewmodel and what it exposes or directly call the render/sideeffect methods or something else?
b
I would use a real ViewModel but inject mock dependencies through its constructor. This way you can control what IO does (network, disk, db, etc)
But I guess it depends on what you're trying to test. If you just want to check the UI you can probably call the render directly