class Foo{
fun fx(parm: MutableList<Double>) {}
}
val foo = Foo()
val parm = slot<MutableList<Double>>()
every { foo.fx(capture(parm)) }
The capture() function you used basically was meant to capture single values into your list, but it wasn’t capturing a list you would try to pass as a function argument. To make it work you would need to write this instead:
class Foo{
fun fx(parm: MutableList<Double>) {}
}
val foo = Foo()
val parm = mutableListOf<MutableList<Double>>()
every { foo.fx(capture(parm)) }
Thanks a lot for the answer, it works. I was misunderstood the usage of Slot and MutableList. I thought that MutableList used when the argument is in List type. It’s used when multiple invocation’s argument were expected to be recorded instead