FIx koin context starting twice
This commit is contained in:
parent
c780f26533
commit
5c88a3f467
@ -72,6 +72,7 @@ dependencies {
|
|||||||
implementation "androidx.work:work-runtime-ktx:2.4.0"
|
implementation "androidx.work:work-runtime-ktx:2.4.0"
|
||||||
implementation "androidx.fragment:fragment-ktx:1.2.3"
|
implementation "androidx.fragment:fragment-ktx:1.2.3"
|
||||||
implementation "androidx.browser:browser:1.2.0"
|
implementation "androidx.browser:browser:1.2.0"
|
||||||
|
testImplementation "org.koin:koin-test:2.1.6"
|
||||||
|
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||||
|
@ -5,20 +5,18 @@ import com.readrops.app.utils.ParsingResult
|
|||||||
import junit.framework.TestCase
|
import junit.framework.TestCase
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Before
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.koin.core.context.startKoin
|
|
||||||
import org.koin.dsl.module
|
import org.koin.dsl.module
|
||||||
|
import org.koin.test.KoinTestRule
|
||||||
|
|
||||||
class HtmlParserTest {
|
class HtmlParserTest {
|
||||||
|
|
||||||
@Before
|
@get:Rule
|
||||||
fun setupKoin() {
|
val koinTestRule = KoinTestRule.create {
|
||||||
startKoin {
|
modules(module {
|
||||||
modules(module {
|
single { OkHttpClient() }
|
||||||
single { OkHttpClient() }
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user