Spring Boot Unit Testing - Service Layer [Part 2] Linkedin: / teddy-smith-015ba61a3 Website: www.teddysmith.io Github: github.com/teddysmithdev
Жүктеу.....
Пікірлер: 6
@Nyze198411 ай бұрын
Maybe also test the cases where exceptions are thrown?
@storm.5252 Жыл бұрын
Very good
@rohansahu12124 ай бұрын
Awesome ❤
@goshochernii3 ай бұрын
what is the difference between just this review.setPokemon(pokemon); and doing that pokemon.setReviews(Arrays.asList(review)); review.setPokemon(pokemon);
@Grainme47
2 ай бұрын
yeah I've got the same question!
@user-yn5gt7jz9k
Ай бұрын
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.
Пікірлер: 6
Maybe also test the cases where exceptions are thrown?
Very good
Awesome ❤
what is the difference between just this review.setPokemon(pokemon); and doing that pokemon.setReviews(Arrays.asList(review)); review.setPokemon(pokemon);
@Grainme47
2 ай бұрын
yeah I've got the same question!
@user-yn5gt7jz9k
Ай бұрын
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.