What is Mockito Framework? || Mock your class with Mockito-Junit Framework

Sdílet
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...

Komentáře • 16

  • @MrUmang40
    @MrUmang40 Před 4 lety +6

    You are real saviour...... Seriously......

  • @comi3188
    @comi3188 Před 2 lety +1

    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.

  • @ramasharma2574
    @ramasharma2574 Před rokem

    Thanks Naveen for great explanation i was realy blocking with this topic and i got it clearly now ,thanks again!

  • @navneetkaurpopli2766
    @navneetkaurpopli2766 Před 3 lety +1

    wonderful video. Thanks

  • @nitulsingh5818
    @nitulsingh5818 Před 3 lety +1

    Your given example is very helpful for me, thank you Naveen.

  • @ruchitsharma753
    @ruchitsharma753 Před 4 lety +1

    Finally i got it wat is mockito.

  • @nehasuri1023
    @nehasuri1023 Před 3 lety

    Very well explained

  • @janstrakos969
    @janstrakos969 Před rokem

    Thank you :)

  • @PriyankaGupta-mv8cx
    @PriyankaGupta-mv8cx Před 4 lety +2

    Hi Naveen, Is Mockito restricted to be used only with JUNIT? or We can use it with TestNG as well??

  • @PrakashKumar-up9yf
    @PrakashKumar-up9yf Před 2 lety +1

    R u working in bank of America ?

  • @kennethcarvalho3684
    @kennethcarvalho3684 Před rokem

    What is software for drawing on the screen

  • @senthilmurugangsm
    @senthilmurugangsm Před 4 lety

    Can we say Mockito used for test automation ?