You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into an issue where I'm trying to verify mocked calls on an object with the use of eq.
My test looks like:
data classFoo(valbaz:Array<String>)
val bar =Foo(arrayOf("a", "b"))
@Test funtest() {
verify(mock).method(eq(bar))
}
This fails with
java.lang.UnsupportedOperationException: Cannot create a generic array for Array. Use createArrayInstance() or anyArray() instead.
at com.nhaarman.mockito_kotlin.CreateInstanceKt.toArrayInstance(CreateInstance.kt:124)
at com.nhaarman.mockito_kotlin.CreateInstanceKt.createInstance(CreateInstance.kt:61)
at com.nhaarman.mockito_kotlin.CreateInstanceKt.createNullableInstance(CreateInstance.kt:162)
at com.nhaarman.mockito_kotlin.CreateInstanceKt.newInstance(CreateInstance.kt:137)
at com.nhaarman.mockito_kotlin.CreateInstanceKt.createInstance(CreateInstance.kt:63)
Is there something that can be done about this?
The text was updated successfully, but these errors were encountered:
Hi,
I'm running into an issue where I'm trying to verify mocked calls on an object with the use of
eq
.My test looks like:
This fails with
Is there something that can be done about this?
The text was updated successfully, but these errors were encountered: