Does anyone here have an idea why my test doesn't ...
# koin
t
Does anyone here have an idea why my test doesn't work?
Copy code
class MainViewModelTest : KoinTest {

    val predictionUC by inject<PredictionUseCase>()
    val routeUC by inject<RouteInfoUseCase>()
    val vmFactory by inject<MainViewModel.Factory>()

    @Before
    fun before() {
        startKoin {
            modules(appModule)
        }

        declareMock<PredictionUseCase> {  }
        declareMock<RouteInfoUseCase> {  }
    }

    @After
    fun after() {
        stopKoin()
    }

    @Test
    fun `_`() {
        val vm = vmFactory.create(emptyList())

        vm.onFilePicked(File(""))

        verify(predictionUC).onFilePicked(File(""))
    }
}
I always get an error
no interactions with this mock
. I assume the mocks aren't getting injected