Skip to content

Instantly share code, notes, and snippets.

@Nyame123
Created June 12, 2021 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nyame123/63495c430f362e91721aa8d7d2213308 to your computer and use it in GitHub Desktop.
Save Nyame123/63495c430f362e91721aa8d7d2213308 to your computer and use it in GitHub Desktop.
@HiltAndroidTest
class SettingsActivityTest {
@get:Rule
var hiltRule = HiltAndroidRule(this)
@Inject
lateinit var analyticsAdapter: AnalyticsAdapter
@Before
fun init() {
hiltRule.inject()
}
@Test
fun doSomeTest() {
// Can already use analyticsAdapter here.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment