Skip to content

Instantly share code, notes, and snippets.

@ashley-figueira
Last active December 1, 2020 16:20
Show Gist options
  • Save ashley-figueira/74b28c07eb92005e4d597d09a30d6b81 to your computer and use it in GitHub Desktop.
Save ashley-figueira/74b28c07eb92005e4d597d09a30d6b81 to your computer and use it in GitHub Desktop.
@UninstallModules(BaseUrlModule::class)
@HiltAndroidTest
@RunWith(AndroidJUnit4::class)
class NewsListFragmentTest {
@get:Rule val hiltRule = HiltAndroidRule(this)
@Module
@InstallIn(ApplicationComponent::class)
class FakeBaseUrlModule {
@Provides
@Singleton
fun provideUrl(): String = "http://localhost:8080/"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment