vio
03/02/2021, 1:11 PMgradle :test
). when run individually with kotest
runs perfectly. I have something like this:
beforeSpec {
Application.start()
mockkObject(MyObjectClass)
every { MyObjectClass.getRandomString() } returns "call made"
})
afterSpec {
clearAllMocks()
Application.stop()
}
....
// some other tests that should make calls to the function that I mocked above
"verify mockk" {
verify(exactly = 7) {
MyObjectClass.getRandomString()
}
}
I can't figure out what could be wrong here, I get this error when run from the command line :
java.lang.AssertionError: Verification failed: call 1 of 1: MyObjectClass(object MyObjectClass).getRandomString()) was not called .......
Any help is appreciated, thank you! 🙏Mattia Tommasone
03/02/2021, 1:59 PMMattia Tommasone
03/02/2021, 1:59 PMMattia Tommasone
03/02/2021, 1:59 PMvio
03/02/2021, 2:03 PMMattia Tommasone
03/02/2021, 2:03 PMvio
03/02/2021, 2:42 PMMattia Tommasone
03/02/2021, 2:43 PMsam
03/03/2021, 12:28 PMvio
03/04/2021, 9:00 AMMattia Tommasone
03/04/2021, 9:02 AM