I am having difficulties when trying to use a CapturingSlot<*> from mockk.
I get the error message shown in the above image
See the paragraph named Capturing in https://mockk.io
As explained in the user guide, I have tried val car = mockk<Car>()
but also val car: CapturingSlot<Car> = slot()
but both attempts results in the error message listet above...
Anyone with suggestions?
This is a compile-time error and I am using the following dependency in my Gradle build file: testImplementation("io.mockk:mockk-jvm:1.13.8")
Jactor-rises, maybe some example code will help:
In this specimen code, imagine that
consumer
is the code under test. It takes 3 args and during it operation it will make call tosomeApi.someCall(...)
with 3 arguments and you want to check the middle one contains the expected data: