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.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'

View File

@ -5,21 +5,19 @@ 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
fun getFeedLinkTest() { fun getFeedLinkTest() {