Matteo Mirk
06/06/2023, 2:04 PMmockkConstructor()
I could verify the call with constructedWith()
, but it's not working. Mockk is complaining:
Missing calls inside verify { ... } block.Currently my test has this setup:
init {
mockkConstructor(Context::class)
}
@Test
fun `ctor is called` {
//constructor is called through a factory function...
verify {
constructedWith<Context>(
EqMatcher("default"),
// other matchers...
)
}
}
Mattia Tommasone
06/06/2023, 2:36 PMhho
06/06/2023, 2:56 PMMattia Tommasone
06/06/2023, 3:02 PMMatteo Mirk
06/06/2023, 3:12 PMMattia Tommasone
06/06/2023, 3:14 PMMattia Tommasone
06/06/2023, 3:16 PMMatteo Mirk
06/07/2023, 10:04 AM