Last active
August 1, 2019 18:08
-
-
Save Audhil/c381d3431857689229ec030369871a57 to your computer and use it in GitHub Desktop.
dagger module in test/ folder - https://proandroiddev.com/unit-tests-with-dagger2-retrofit2-rxjava2-and-mockk-android-1c268fa77957
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestApplicationModule(delegate: GDelegate) : ApplicationModule(delegate) { | |
override fun giveAppAPIs(): AppAPIs = mockk() | |
override fun giveRetrofitService(okHttpClient: OkHttpClient): AppAPIs = mockk() | |
override fun giveOkHttpClient(loggingInterceptor: HttpLoggingInterceptor): OkHttpClient = mockk() | |
override fun giveLoggingInterceptor(): HttpLoggingInterceptor = mockk() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment