what is the difference between just this review.setPokemon(pokemon); and doing that pokemon.setReviews(Arrays.asList(review)); review.setPokemon(pokemon);
@Grainme476 ай бұрын
yeah I've got the same question!
@pcgame-f1o6 ай бұрын
In this specific case test, if we focus on the line 58 where we have the if(logic). You will note that the scenarios is looking if in the review has the pokemon_id. After that, the second act, just get the pokemon_id. After that, has been a comparation if the id inside the pokemon_review is equals pokemon_id If in this scenario we set like this: pokemon.setReviews(Arrays.asList(review)); the condition at line 58 will not be true, cause we wasn't set the pokemon_id into the review object. I hope this was helpfully.