André Martins
04/21/2022, 12:12 PMclass MyService { … }
and an extension property like
val MyService.myProp: String
get() = "value"
when doing
mockk<MyService> {
every { myProp } returns "otherValue"
}
it throws a MockkException
msg: Missing mocked calls inside every { ... } block: make sure the object inside the block is a mock
mockkStatic(MyService::myPro)
although I cannot create a KProperty of an extension propmyProp is a member and an extension at the same time. References to such elements are not allowed