FIx koin context starting twice

This commit is contained in:
Shinokuni 2020-10-21 21:31:08 +02:00
parent c780f26533
commit 5c88a3f467
2 changed files with 8 additions and 9 deletions

View File

@ -72,6 +72,7 @@ dependencies {
implementation "androidx.work:work-runtime-ktx:2.4.0"
implementation "androidx.fragment:fragment-ktx:1.2.3"
implementation "androidx.browser:browser:1.2.0"
testImplementation "org.koin:koin-test:2.1.6"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'

View File

@ -5,20 +5,18 @@ import com.readrops.app.utils.ParsingResult
import junit.framework.TestCase
import okhttp3.OkHttpClient
import org.junit.Assert
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.koin.core.context.startKoin
import org.koin.dsl.module
import org.koin.test.KoinTestRule
class HtmlParserTest {
@Before
fun setupKoin() {
startKoin {
modules(module {
single { OkHttpClient() }
})
}
@get:Rule
val koinTestRule = KoinTestRule.create {
modules(module {
single { OkHttpClient() }
})
}
@Test