thuytrinh
12/03/2018, 10:52 AMrkeazor
12/03/2018, 1:29 PMrkeazor
12/03/2018, 1:35 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"))
.thuytrinh
12/06/2018, 8:29 PMAlso 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.
thuytrinh
12/06/2018, 8:30 PMthuytrinh
12/06/2018, 8:31 PMstojan
12/08/2018, 8:15 PM