Spring Boot Unit Testing With Mockito - Repository [Part 1]

  Рет қаралды 42,457

Teddy Smith

Teddy Smith

Күн бұрын

Пікірлер
@joaogabrielv.m328
@joaogabrielv.m328 2 жыл бұрын
Dang! Did not remember Java could be "that simple". Definitely I will spare some time to watch the whole course form the beginner as soon as my vacations from college start. For now, i'm just entering at youtube to give my like and show my support to ya, Teddy. Keep up with the great work, man!
@rafastepniewski6135
@rafastepniewski6135 7 ай бұрын
Best Spring-Test Series Ever!
@heapsofttech
@heapsofttech Жыл бұрын
Why are you testing methods of JPA repository, save and findAll() , we did not write these methods, these methods are part of library, I did not understand the intention to test these methods,
@GusLapchatiy
@GusLapchatiy Жыл бұрын
@@cloud727 well, so you got your spring functionality all tested too, I mean all functionality? Because idiots and everything, you know.
@masterchief1520
@masterchief1520 5 ай бұрын
Yeah makes no sense.
@abdelghanielaoud8018
@abdelghanielaoud8018 5 ай бұрын
The reason is that some times in the repository itself you will write a complex method like finUserByIdAndName and from this method you want just his list of roles, so you add a @Query in the above to assert what you want. So as you can see the context has got complex here, so you need to assert the results before putting it into work. for other simple methods as you mentionned like [save and findAll()] in most cases we dont need to do it, i think its mentionned, you always want to assert the result of the complex methods that you have doubt about.
@rajvardhanshinde6251
@rajvardhanshinde6251 Жыл бұрын
The autowired instances of the repositories are not been injected. Getting nullPointer. Any Idea?
@anirudhsingh9025
@anirudhsingh9025 Жыл бұрын
not enough data
@andresfelipelimaszea7151
@andresfelipelimaszea7151 2 ай бұрын
Este man es un puto pro, lo amo
@dandyguandy
@dandyguandy Жыл бұрын
Don't ever use that font when using the whiteboard app, I beg you
@TeddySmithDev
@TeddySmithDev Жыл бұрын
Good idea 🤔
@zayyanabdillah7031
@zayyanabdillah7031 Жыл бұрын
hi teddy, i think i having some kind of issue here, why am i not having the assertThat() method?
@l1keeN
@l1keeN Жыл бұрын
You are using wrong annotation import, you need org.assertj.core.api.Assertions
@SomeoneinYouTube-cm3eo
@SomeoneinYouTube-cm3eo Жыл бұрын
@@l1keeN thanks for this
@vip51000
@vip51000 Жыл бұрын
assertj is another library
@MTB_Bay_Area
@MTB_Bay_Area 11 ай бұрын
Thank you
@rydmerlin
@rydmerlin Жыл бұрын
Are you spinning up your whole app to do these tests?
@rahilsanghavi9347
@rahilsanghavi9347 Жыл бұрын
Are you testing with a real database are you using some in-memory database like h2?
@TeddySmithDev
@TeddySmithDev Жыл бұрын
H2
@rahilsanghavi9347
@rahilsanghavi9347 Жыл бұрын
@@TeddySmithDev Thank you
@Johnson-ot5bh
@Johnson-ot5bh Жыл бұрын
we could also use test container instead of h2
@massimoramaj3233
@massimoramaj3233 Жыл бұрын
Could not detect default configuration classes for test class! Any idea?
@TeddySmithDev
@TeddySmithDev Жыл бұрын
You are probably missing an annotation somewhere
@purnimakumari7735
@purnimakumari7735 Жыл бұрын
I am getting nullpointerexception
@gabrielfono844
@gabrielfono844 9 ай бұрын
me too
Spring Boot Unit Testing With Mockito - Repository [Part 2]
7:16
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Spring Boot Unit Testing With Mockito - 1. First Unit Test
14:42
Teddy Smith
Рет қаралды 108 М.
Семен Киреков - Spring Data JPA. Антипаттерны тестирования
54:34
JPoint, Joker и JUG ru — Java-конференции
Рет қаралды 9 М.
Learn Git - The Full Course
4:20:00
Boot dev
Рет қаралды 125 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1,3 МЛН
Spring Boot Testcontainers - Integration Testing made easy!
33:31
Spring Boot - Testing basics
16:05
Defog Tech
Рет қаралды 76 М.
Unit Testing in Spring Boot with JUnit 5 and Mockito | Part 1
30:37