Orhan Tozan
09/02/2021, 2:24 PMMatthew Laser
09/02/2021, 8:21 PMKoinTest
• Inside of my @Before
annotated method, I create a module
and start koin
val module = module {
single { myMockInstance }
}
startKoin { modules(module) }
Then during tests, the mocked object myMockInstance
gets injected into the classes under test
• In of an @After
annotated method, call stopKoin()
Matthew Laser
09/02/2021, 8:22 PM