I've been digging around for more about Mockito and how it's different from EasyMock / jMock here's what I got:
- http://monkeyisland.pl/2008/03/21/lets-spy/
As Gerard Meszaros would define a mock, Mockito is not a mocking framework it is a "Test Spy" framework. - http://xunitpatterns.com/Test Spy.html
Definition of a Test Spy - http://xunitpatterns.com/Mock Object.html
Definition of a Mock Object - http://hamletdarcy.blogspot.com/2007/10/mocks-and-stubs-arent-spies.html
about the difference between test spies + mocks - http://monkeyisland.pl/2008/07/12/should-i-worry-about-the-unexpected/
A great argument against "mocking" frameworks in general. - http://dannorth.net/2008/09/the-end-of-endotesting
Endo-Testing is where the idea of mocking came from and Dan North thinks mockito is the end of Endo-Testing - http://www.connextra.com/aboutUs/mockobjects.pdf
The mock objects paper (I didn't read it :P)
I think there are very few use cases for mocks. They produce brittle tests and are hard to read. In addition 99% of the time you don't want a mock, you want a test spy. So why if you had the choice would you choose a mocking framework over a test spy framework?
No comments:
Post a Comment