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

  Рет қаралды 39,946

Teddy Smith

Teddy Smith

Күн бұрын

Пікірлер: 25
@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 6 ай бұрын
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 10 ай бұрын
@@cloud727 well, so you got your spring functionality all tested too, I mean all functionality? Because idiots and everything, you know.
@masterchief1520
@masterchief1520 3 ай бұрын
Yeah makes no sense.
@abdelghanielaoud8018
@abdelghanielaoud8018 3 ай бұрын
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
@andresfelipelimaszea7151 Ай бұрын
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 🤔
@rajvardhanshinde6251
@rajvardhanshinde6251 Жыл бұрын
The autowired instances of the repositories are not been injected. Getting nullPointer. Any Idea?
@anirudhsingh9025
@anirudhsingh9025 Жыл бұрын
not enough data
@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
@MTB_Bay_Area
@MTB_Bay_Area 9 ай бұрын
Thank you
@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
@massimoramaj3233
@massimoramaj3233 10 ай бұрын
Could not detect default configuration classes for test class! Any idea?
@TeddySmithDev
@TeddySmithDev 10 ай бұрын
You are probably missing an annotation somewhere
@purnimakumari7735
@purnimakumari7735 11 ай бұрын
I am getting nullpointerexception
@gabrielfono844
@gabrielfono844 8 ай бұрын
me too
Spring Boot Unit Testing With Mockito - Repository [Part 2]
7:16
Test Driven Development (TDD) | Crash Course | 2020
43:53
Amigoscode
Рет қаралды 127 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 20 МЛН
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 53 МЛН
2 MAGIC SECRETS @denismagicshow @roman_magic
00:32
MasomkaMagic
Рет қаралды 36 МЛН
Spring Boot Unit Testing With Mockito - Mocking Explained
15:30
Teddy Smith
Рет қаралды 32 М.
Spring Boot Unit Testing With Mockito - 1. First Unit Test
14:42
Teddy Smith
Рет қаралды 101 М.
Learn RAG, LangChain, Vector DB's, with this project, FULL COURSE
1:29:21
PropTech Founder
Рет қаралды 1,1 М.
Java Unit Testing with JUnit - Tutorial - How to Create And Use Unit Tests
21:35
Spring Boot Unit Testing With Mockito - Repository [Part 3]
14:31
Spring Boot + JUnit 5 + Mockito Tutorial
1:48:49
ProgrammingKnowledge
Рет қаралды 130 М.
Spring Boot testing: Zero to Hero by Daniel Garnier-Moiroux
2:42:32
Spring Boot Integration Test with TDD | JUnit5  & H2 | JavaTechie
45:27