Spring Boot Unit Testing With Mockito - Mocking Explained

preview_player
Показать описание
Spring Boot Unit Testing - Mocking + Service Layer

Рекомендации по теме
Комментарии
Автор

Great videos! Quick nerd note, I believe that the logic is inverted on the way you described non-deterministic. The way you described how we want unit test to have stable and reproducible output is deterministic.

mattcummings
Автор

Thanks for the great video, helped me a lot understand mocking. Only a small remark from me: deterministic literally means "something that can be determined"(each and every time). We want the tests to be deterministic, e.g. have the exact same output for the same input each and every time.

waltzofthestars
Автор

Man your explanation was so good and helped me to understand perfectly what I had to do. Really really thank you, I had been struggling with this for a while and you saved me!

alma
Автор

Did you mean non-random? because you said non-deterministic is when you always get the same result for the same input, but this is fully deterministic then

piotrjaga
Автор

You well explained the principal of Mockito but didn't explained how each of them works. When do we need to use Mockito.any(...), mockito.mock(...), when()... And what does all these methods do ?

lenigaussgauss
Автор

This is top notch content. Thanks. Can you please cover all this in more detail? I would appreciate if you can cover Integration testing as well. Please take some common examples like Students or Employee.

jasper
Автор

Hi @Teddy Smith is there any videos where you show the creation of this project from scratch? Or was this just an example specifically for the testing videos?

paulallen
Автор

great video, thank you! That was very helpful.
One question though: You have been injecting the implementation of pokemonService. Does it have to be the class? Could we possibly use the interface instead and have mockito decide which class to use (maybe with some attribute added for specification, in case there is more than one implementation around)?
e. g. Spring Autowiring would allow doing so

jonastimo
Автор

how come this test case can be passed? pokemon object is built using builder pattern.

tharlinhtet
Автор

Thx you man.
What application do you use for your note ? I like the hand writer

daoudasylla
Автор

It seems I am the only only who didn't find explanation good. Everyone seems to be liked it but I feel you didn't even explain. You only coded yourself.

sarpyldrm