In my project they plan to use EasyMock, I am more in favour of Mockito,but I must be able to explain why...
You might read this http://xunitpatterns.com/index.html before you start, to get familiar with terminology like Test Double, Test Spy etc.
Mockito presentation here (audio is awful):
http://www.youtube.com/v/rOcuSPUpuXs
http://www.youtube.com/v/fisGZtYRIso
http://www.youtube.com/v/UIjQ4zQ5oGA
remember that the SUT is the Controller, not the Service! You mock the Service to test the Controller. The audience has a real problem with that...
here the presentation slides
http://www.slideshare.net/rapaul/mockito-presentation
Mockito is about INTERACTION testing, not STATE testing.
Here a very good conceptual document:
http://szczepiq.files.wordpress.com/2008/08/dont-give-up-on-mocking.pdf
Some other slides here
http://www.slideshare.net/carrja99/mockito
here Mockito Javadoc:
http://mockito.googlecode.com/svn/tags/1.8.1-rc1/javadoc/index.html?index-all.html
WIP....
Sunday, June 6, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment