For those using hilt, i’m having a bit of an issue...
# android-architecture
m
For those using hilt, i’m having a bit of an issue in my testing. I have an OkHttpClient that i have in a module. I’m then using TestInstallIn to replace that module, and supply a new OkHttpClient:
Copy code
@Provides
    @Singleton
    fun okHttp(
        mockInterceptor: MockInterceptor
    ): OkHttpClient { ... }
I was under the impression that I could use an @BindValue in my test case to provide the MockInterceptor, but the dagger compiler seems to not be able to resolve that dependency. My other option is adding it as an @Provides in the module and using @Inject to get it into my test case. What’s the preferred way of actually doing something like this?