https://kotlinlang.org logo
#android
Title
# android
h

Hadi Tok

06/01/2018, 9:12 PM
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

dave08

06/03/2018, 4:01 AM
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

Hadi Tok

06/08/2018, 8:41 AM
will check it out thank you.
5 Views