Mockito Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ต.ค. 2024
  • Learn Java based mocking frame work Mockito and its integration with Spring

ความคิดเห็น • 51

  • @NXKS2010
    @NXKS2010 9 ปีที่แล้ว +29

    Please note that it is pointless to test the mocked objects!
    Current scenario:
    1) Class B is not available
    2) Let's test class B
    Why would you do this?
    More appropriate scenario would be:
    1) Class A is using the functionality provided by class B
    2) Class B is not available, so it it mocked
    3) Class A is tested using the mocked class B.

    • @Veujin
      @Veujin 8 ปีที่แล้ว +1

      That case is on 13:41

    • @sunnysaurabh5712
      @sunnysaurabh5712 6 ปีที่แล้ว

      its done to concentrate on A. when B is taken care by some one else. it happens on big scale development cycle

  • @vincentluciani
    @vincentluciani 9 ปีที่แล้ว +1

    Hi Padma, Thanks a lot for this great tutorial. What is great about it is that the example is simple and you explain step by step. Thanks to you I was able to implement my mock test. Vincent

  • @mk9834
    @mk9834 4 ปีที่แล้ว

    All i need was the clarification in the first 40 seconds of this video thank you so much!

  • @charliemmadad
    @charliemmadad 9 ปีที่แล้ว +1

    Great tutorial. I like the Spring integration discussion.

  • @My3YTK
    @My3YTK 9 ปีที่แล้ว

    Thank you for demo. It was really helpful and great presentation.

  • @davidandanahale5884
    @davidandanahale5884 7 ปีที่แล้ว

    Thanks - this was helpful. I will continue to read and use Mockito in our future applications.

  • @manawardhana
    @manawardhana 8 ปีที่แล้ว

    Good job! Nicely explained in a short time frame.

  • @BalaguruGupta
    @BalaguruGupta 9 ปีที่แล้ว +1

    Very nice Explanation. Thank you so much.

  • @seric16
    @seric16 9 ปีที่แล้ว +1

    Excellent tutorial! Thank you :)

  • @juergritter12
    @juergritter12 8 ปีที่แล้ว

    Thank you so much for this very clear explanation! Helps a lot!

  • @giwahdavalos4699
    @giwahdavalos4699 9 ปีที่แล้ว

    great tutorial, especially the TDD part. Thank you :)

  • @sivas5620
    @sivas5620 9 ปีที่แล้ว

    Excellent explanation ......it helps a lot Thanks padma chopparapu

  • @kasthurirengansrinivasan7183
    @kasthurirengansrinivasan7183 8 ปีที่แล้ว

    Great help you have done. Thank you so much

  • @karthikmk9
    @karthikmk9 9 ปีที่แล้ว +1

    Good Explanation, Got idea on Mockito and how it is used from testcases

  • @erikvdp8911
    @erikvdp8911 8 ปีที่แล้ว +1

    Thanks you so much! Great explanation!

  • @SandeepKumar-bm7qu
    @SandeepKumar-bm7qu 9 ปีที่แล้ว

    Very well explained. Thanks a lot !!

  • @vadymmorozov6956
    @vadymmorozov6956 9 ปีที่แล้ว +1

    Thank you. Very good tutorial.

  • @fleetwu
    @fleetwu 6 ปีที่แล้ว

    Thank you very much. Is very helpful.

  • @priyabiradar9299
    @priyabiradar9299 4 ปีที่แล้ว

    supeb video dude

  • @603travels
    @603travels 8 ปีที่แล้ว

    Nice Explanation , Thank you so much

  • @speedmishra13
    @speedmishra13 6 ปีที่แล้ว

    Thank you. Very helpful!

  • @priyabiradar9299
    @priyabiradar9299 4 ปีที่แล้ว

    clearly explanation , supeb dost

  • @marounbassam
    @marounbassam 9 ปีที่แล้ว

    Great explanation, thank you.

  • @arunkumarrai2
    @arunkumarrai2 8 ปีที่แล้ว

    Good explanation.Thank you.

  • @kasulachinna688
    @kasulachinna688 7 ปีที่แล้ว

    Thanks-nice explanation.I want Mockito tutorial URL

  • @mandeepbhogal7502
    @mandeepbhogal7502 9 ปีที่แล้ว

    Thankyou so much sir....Keep enlightening :)

  • @AshokKumar-gn1jy
    @AshokKumar-gn1jy 10 ปีที่แล้ว

    Good one. But Mokito has its own major limitations like we cannot test Static methods etc.. Using PowerMock with Mockito will solve limitations of Mokito. Mokito is a kind of subset to PowerMock.

  • @tugrulasik2791
    @tugrulasik2791 9 ปีที่แล้ว

    Good tutorial. Thanks.

  • @derekgege
    @derekgege 6 ปีที่แล้ว

    very helpful! Thanks!

  • @bassdewd
    @bassdewd 9 ปีที่แล้ว

    When you were asserting, why did you flip around expected & actual?

  • @vivekach1
    @vivekach1 7 ปีที่แล้ว

    Thank you.. It is helpful. :)

  • @rajeshupputuru
    @rajeshupputuru 2 ปีที่แล้ว

    Hi sir , how to write Junit test case constructor passing ( string ,int ,Boolean ,object ) fields how to write

  • @jpruban
    @jpruban 8 ปีที่แล้ว

    Great tutorial.......

  • @ropro9817
    @ropro9817 7 ปีที่แล้ว +1

    Why are you unit testing a mock object???

  • @klausheino6986
    @klausheino6986 6 ปีที่แล้ว

    this was helpful. thanks

  • @preethikashenoy
    @preethikashenoy 7 ปีที่แล้ว

    Can you make a tutorial for mocking SQLiteDatabase to test SQL query?

  • @razoryonov
    @razoryonov 9 ปีที่แล้ว

    why are you mocking object which is already implemented?

  • @RS-so7ke
    @RS-so7ke 6 ปีที่แล้ว

    How to add dependency through maven?

  • @pariwesh06
    @pariwesh06 8 ปีที่แล้ว +3

    DO you really understand mocking?

  • @ravitejaemandi8741
    @ravitejaemandi8741 5 ปีที่แล้ว

    Hai, i need freelancer, i have 4 java classes for that i need to write 4 mockito classes. Could you please write for me.

  • @jiayipeng1138
    @jiayipeng1138 9 ปีที่แล้ว

    Thanks

  • @gaurav00tiwari
    @gaurav00tiwari 8 ปีที่แล้ว

    Near to perfet video to start with, but if you could have enhanced the video using the layeredarchitecture things could have been even better......
    But really cool Job...:-)

  • @GK-ui8fv
    @GK-ui8fv ปีที่แล้ว

    Please do not use "An Unit". It was in one of your slide. The correct usage is - "It’s a unit. The rule for using “a” or “an” is based on pronunciation, not spelling. Since the initial letter of the word unit makes a consonant sound, a “you” sound, it takes the indefinite article “a”.
    So, a user does not become an user and similarly a university does not become an university.

  • @Aristh1234
    @Aristh1234 4 ปีที่แล้ว

    I really don't get what we are achieving by doing so much...I mean we are writing everything what we are expecting...what am I gaining here...

  • @san1eong
    @san1eong 5 ปีที่แล้ว

    This training bring more confusion than understanding to people who doesn't have a clear idea of what is unit testing. When you test, you want to ensure that the module perform as expected... If you mock the object you want to test and manipulate the expecting result with when().thenReturn() you are not making any test, you are just deceiving yourself.

  • @sunilkumarpatro7606
    @sunilkumarpatro7606 6 ปีที่แล้ว

    updated

  • @factsindian2024
    @factsindian2024 7 ปีที่แล้ว

    he has knowledge but failed to explain properly. may be this is not for beginners. what is the use of mock objects ?

  • @hannesprinsloo7814
    @hannesprinsloo7814 5 ปีที่แล้ว

    This is totally useless. You are bootstrapping the response of the class you are testing.

  •  7 ปีที่แล้ว

    seems pointless