thuytrinh
12/03/2018, 10:52 AMrkeazor
12/03/2018, 1:29 PMstojan
12/03/2018, 5:44 PMthuytrinh
12/06/2018, 8:25 PMinterface PokemonProvider {
fun getPokemon(): Pokemon
}
With Pokemon
is an inline class. Then if I mock PokemonProvider
, I say PokemonProvider
not Pokemon
, then Mockito will complain incompatible types if I call whenever(pokemonProvider.getPokemon()).thenReturn(Pokemon("Pikachu"))
.Also you should look into the Mockk mocking library. they are very up to date with the latest Kotlin trendsI believe mockk is also facing the same limitation.
stojan
12/08/2018, 8:15 PM