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.
NXKS
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
vincentluciani
All i need was the clarification in the first 40 seconds of this video thank you so much!
mk
Thank you for demo. It was really helpful and great presentation.
MyYTK
Great tutorial. I like the Spring integration discussion.
charliemmadad
Thanks - this was helpful. I will continue to read and use Mockito in our future applications.
davidandanahale
Excellent explanation helps a lot Thanks padma chopparapu
sivas
Good job! Nicely explained in a short time frame.
manawardhana
great tutorial, especially the TDD part. Thank you :)
giwahdavalos
Thank you so much for this very clear explanation! Helps a lot!
juergritter
Great help you have done. Thank you so much
kasthurirengansrinivasan
Good Explanation, Got idea on Mockito and how it is used from testcases
karthikmk
Very nice Explanation. Thank you so much.
BalaguruGupta
When you were asserting, why did you flip around expected & actual?
bassdewd
Hi sir, how to write Junit test case constructor passing ( string, int, Boolean, object ) fields how to write
rajeshupputuru
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.
AshokKumar-gnjy
Thanks you so much! Great explanation!
erikvdp
why are you mocking object which is already implemented?