Mocks, Stubs and Spies with Mockito - JUnit Tutorial
ฝัง
- เผยแพร่เมื่อ 31 ม.ค. 2025
- Learn about the differences between a mock, a stub, and a spy for the purposes of creating test doubles with the Mockito framework.
In this video, I have used an example to demonstrate when we would want to use each of the different test doubles and the unique benefits they can offer when automation testing.
The source code from this video is available on GitHub: github.com/4ne...
Comment, like and subscribe for more content on Java and software engineering.
Visit my website to also see my blogs: aneesh.co.uk
Your have arranged the content very well. The definitions are easy with good examples. I haven't got a chance to use Spy in real world.
Thanks for creating this. I will recommend this and the previous video as a starter for anyone who is new to Mockito.
Thank you so much! It means a lot to me, I am glad it helped
Very well 15 minutes, concise, informative, without unnecessary digressions. Good job.
Thank you!
I can't tell you how many videos I had to watch before I saw yours. This is a really great content, thanks a lot.
Thank you!!!
This is great, exactly what I was looking for. Great quality, thanks a lot!
Thank you so much for saying!
Nice concise explanation!
Underrated channel and video you deserve more views and subs! Subbed!
😄 thank you!
I was so confused watching other videos. Thank you!
I’m glad it could help! Thank you!
Absolutely top notch content!
Thank you so much!!
top quality content
Thank you so much!
Super easy to understand, thank you!!!
Thank you Nekane!
Very useful, please upload more videos to test coroutines, flows and new android concepts.
I like the way you are explaining topic
Thank you!
Very clear tutorial - thank you!
Thank you!
bro you are hella underrated you deserve at least 300k subs.
Thank you so much! New videos will be coming soon :)
Excellent content! Great work!
Thank you!
Great content, well explained with explained. Thanks
Thank you!
Thanks for everything you do, as those lessons are the best I've ever found so far.
Please consider Jackson (json) course once you'll have time :)
Thank you! I am working on some infrastructure videos now but can do some json work in the future as well
Great content! Congrats!
Thank you!
That was amazing. Thank you so much!
Thank you Szymon!
Thanks for nice explanation.
Thank you Sushil!
great video. explained it really well. thank you !!
Thanks Guy!
Great video!
Thank you!
Good stuff!
Thank you!
Your content is really good. Please cover mockito for repository and entitymanager. Thanks for the nice video.
Hey Pranav, sure! Will let you know when this is published
@@AneeshMistry - Thanks so much!
Your content is amazing! Could you create some content for Dependency injection, setter injections, how to create a simple app using Spring? Thanks!
Hey, thank you! I have created a Spring series on creating a REST API. But I will also do some videos on dependency injection/setter injections in the near future
th-cam.com/video/c9iKKAZY00g/w-d-xo.html
Thank you!
Thanks Austin!
Great, thanx.
Hi Aneesh, m getting NPE every time I use mock. Can you please help?
Hey, please share a link to the repo with the null pointer and I can take a look
What if numberOfSubscribers is private ? How to test sendNewsLetter ? How to mock this method ?
Hi Alfred, please see my video on testing private methods: th-cam.com/video/EUXesPg7qOo/w-d-xo.html