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!
@rafastepniewski61356 ай бұрын
Best Spring-Test Series Ever!
@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,
@GusLapchatiy10 ай бұрын
@@cloud727 well, so you got your spring functionality all tested too, I mean all functionality? Because idiots and everything, you know.
@masterchief15203 ай бұрын
Yeah makes no sense.
@abdelghanielaoud80183 ай бұрын
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.
@andresfelipelimaszea7151Ай бұрын
Este man es un puto pro, lo amo
@dandyguandy Жыл бұрын
Don't ever use that font when using the whiteboard app, I beg you
@TeddySmithDev Жыл бұрын
Good idea 🤔
@rajvardhanshinde6251 Жыл бұрын
The autowired instances of the repositories are not been injected. Getting nullPointer. Any Idea?
@anirudhsingh9025 Жыл бұрын
not enough data
@rydmerlin Жыл бұрын
Are you spinning up your whole app to do these tests?
@rahilsanghavi9347 Жыл бұрын
Are you testing with a real database are you using some in-memory database like h2?
@TeddySmithDev Жыл бұрын
H2
@rahilsanghavi9347 Жыл бұрын
@@TeddySmithDev Thank you
@Johnson-ot5bh Жыл бұрын
we could also use test container instead of h2
@MTB_Bay_Area9 ай бұрын
Thank you
@zayyanabdillah7031 Жыл бұрын
hi teddy, i think i having some kind of issue here, why am i not having the assertThat() method?
@l1keeN Жыл бұрын
You are using wrong annotation import, you need org.assertj.core.api.Assertions
@SomeoneinYouTube-cm3eo Жыл бұрын
@@l1keeN thanks for this
@vip51000 Жыл бұрын
assertj is another library
@massimoramaj323310 ай бұрын
Could not detect default configuration classes for test class! Any idea?