-
Notifications
You must be signed in to change notification settings - Fork 0
net.natura.testcommons.rules.KoinRule
Lucas de Souza da Conceição edited this page Jul 9, 2020
·
2 revisions
class KoinRule : TestRule
A JUnit4 rule that starts and stops Koin instance between tests.
Example usage:
class MyActivityTest {
@get:Rule
val koinRule = KoinRule()
@get:Rule
val koinRuleWithModule = KoinRule(yourKoinModule)
@get:Rule
val koinRuleWithModuleList = KoinRule(listOf(koinModule1, koinModule2)
}
injectedModuleList
- List of modules that can be injected at start (optional);
injectedModule
- Module that can be injected at start (optional).
Name | Summary |
---|---|
<init> |
KoinRule(injectedModule: Module) KoinRule(injectedModuleList: List <Module> = listOf())
|