What is Mockito Framework? || Mock your class with Mockito-Junit Framework
Vložit
- čas přidán 21. 08. 2024
- In this video, I have explained how to mock a class object using popular mocking framework - Mockito.
Learn:
--What is mocking
-What is Mockito Framework
--What is @Mock and mock() method
-What is @InjectMocks annotations
--How to define the behaviour of a mocking object
--How to assert the results from mocking object
~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
www.youtube.co...
Follow me on my Facebook Page:
/ naveenqtpexpert
Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
t.me/joinchat/...
Paid courses (Recorded) videos:
naveenautomati...
For Java & Selenium - naveenautomatio...
For API (Manual + Automation) - naveenautomatio...
You are real saviour...... Seriously......
In your @InjectMocks annotation example you say that mockEmployee properties are getting injected into the mockList but it's really the other way around. Properties annotated with @Mock are dependencies of the @InjectMocks property. In this case mockList is injected into the mockEmployee instance.
Thanks Naveen for great explanation i was realy blocking with this topic and i got it clearly now ,thanks again!
wonderful video. Thanks
Your given example is very helpful for me, thank you Naveen.
You're most welcome
@@naveenautomationlabs 🙏
Finally i got it wat is mockito.
Very well explained
Thank you :)
You're welcome!
Hi Naveen, Is Mockito restricted to be used only with JUNIT? or We can use it with TestNG as well??
We can use by both junit and TestNG
R u working in bank of America ?
What is software for drawing on the screen
Can we say Mockito used for test automation ?