I am trying to write tests for Google Drive. Mocki...
# android
h
I am trying to write tests for Google Drive. Mockito has
Mockito.any(Class<T> type)
I couldn’t figure out how should I provide
OnSuccessListener<MetadataBuffer>
as a class type to
Mockito.any(Class<T> type)
as a parameter when I try
any(OnSuccessListener<MetadataBuffer>.javaClass)
I got this error
Function invocation 'OnSuccessListener<MetadataBuffer>(...)' expected
any idea how I fix this?
d
You might want to look into #mockk, I'm not sure about this particular case, but you'll find it more enjoyable to use with Kotlin altogether...
h
will check it out thank you.