Thank you for your concise and understandable explanation! I was so confused after going through many articles, but finally understand it in your video.
Hello. I have a question. As UserService class is a @Service bean, why you do not use @Resource on UserService class and @MockBean on its child field dao ?
Nice explanation. Can you explain what is the value of variable 'id', which is used in assert method? If the value of id is from when clause and not from the actual DB call, then what is the purpose of this approach?
Yes Mahesh, That is the concept of mocking, Here our core duty is we need to test a particular code in service layer. We are not bothered about DAO layer. So instead hitting in to DB, we will get the mock data, so here variable id is the Mock Data. This the concept of Mocking. For Mocking and unit tests You can watch more videos: th-cam.com/play/PLBb5HFCJVQtucUCR91j_rqWIr3XpLFXVc.html
I subscribed to your channel only watching this video. Excellent explanation!
Thank you for your concise and understandable explanation!
I was so confused after going through many articles, but finally understand it in your video.
Thank you 😊,
Hello. I have a question. As UserService class is a @Service bean, why you do not use @Resource on UserService class and @MockBean on its child field dao ?
You have got a new subscriber!!
Appreciate 😊, This will motivate me to upload more such content .
@@JavaShastra keep up the good work, I loved the way you illustrated the difference. Underrated channel it is!!
very nice explanation
Thanks and welcome
Thank you. God bless you.
Thank you for your feedback 😊.
Very lucid explanation , Thanks :)
Thank you!!! Very good, easy to follow explanation
Helped it sir.Thank you
Thanks
appreciate ..keep posting good videos
Super explanation
Thank you 🙂, for your comment , this will keep me uploading more videos.
Nice explanation. Can you explain what is the value of variable 'id', which is used in assert method? If the value of id is from when clause and not from the actual DB call, then what is the purpose of this approach?
Yes Mahesh, That is the concept of mocking, Here our core duty is we need to test a particular code in service layer. We are not bothered about DAO layer. So instead hitting in to DB, we will get the mock data, so here variable id is the Mock Data. This the concept of Mocking.
For Mocking and unit tests You can watch more videos:
th-cam.com/play/PLBb5HFCJVQtucUCR91j_rqWIr3XpLFXVc.html
Nicely explained.
Thank you for your encouraging words , it will help me to create such more contents.
Rajnikant, ennaraskkalla
Thanks
Thank you for your valuable comment, this will help me to upload to such more content.
Extremely Confusing ...You confused more
Which statement u got confused ? Let me know