Closed konrad-poczatek closed 1 year ago
@konrad-poczatek yes, it's by design:
https://github.com/mockito/mockito-kotlin/wiki
Mockito returns null values for calls to method like any(), which can cause IllegalStateException when passing them to non-nullable parameters. This library solves that issue by trying to create actual instances to return.
@FyiurAmron thank you very much. There is just few words in Wiki and I didn't read them. Shame on me.
Hi!
In mockito any() method:
Matches <strong>anything</strong>, including nulls and varargs.
In mockito-kotlin any() method:Matches any object, excluding nulls.
Is it done on purpose?