Kshitij Patil
05/07/2021, 5:40 AM@ViewModelScoped
classes in a unit test?
I want to test the ViewModel and I'm using hilt for DI so I have everything wired up until Repository. Now I want to inject the actual repository while writing tests for ViewModel but the problem is, I'm getting some error @Singleton
dependencies cannot be used..
I doubt this has something to do with @ViewModelScoped
repository and several other dependencies.
I'm open to know whether I should not use the actual repository and why.