I'm trying to do some test with Koin, but I'm getting the "Unresolved reference:KoinTest' howeber, seems that is doing the imports correctly, because I can't see any error in the code. Is only when I try to run the test.
I've tried to clean and rebuild the project and reinit android studio, but still the problem
TEST CLASS
import org.junit.After
import org.junit.Before
import org.junit.Test
import org.koin.core.context.startKoin
import org.koin.core.context.stopKoin
import org.koin.test.KoinTest
import salva.perez.cabify.di.applicationModule
import org.koin.test.inject
class VoucherPresenterTest : KoinTest {
private val presenter: VoucherContract.Presenter by inject()
@Before
fun before() {
startKoin {
modules(applicationModule)
}
}
@After
fun after() {
stopKoin()
}
@Test
fun testInitViewCorrectly() {
...
}
}
GRADLE
implementation 'org.koin:koin-android:2.0.1'
testImplementation 'org.koin:koin-test:2.0.1'