ArgumentMatchers in MockK2020-03-27 android kotlin mockk
I'm converting from Java to Kotlin, and from Mockito to MockK.
I'm stuck at converting Argument Matchers from Mockito to MockK.
Mockito can do
any() to match anything, including nulls and varargs. (imports ArgumentMatchers.any)
Does MockK have anything for that? In this specific situation, it's not any primitive type. I'm trying to match a class Object.
- Alias an Annotation that takes an argument
- How to stub varargs in Mockito to match only one argument
- Using mockk to match any varargs
- How to mock lambda with mockito in kotlin
- Converting to kotlin
- Using Kotlin and Mockito to mock functions taking vararg parameters
- How to verify kotlin varargs function using mockito