Here ise a good article about argument capture property of mockito: http://blog.james-carr.org/2009/09/28/mockito-verifying-details-of-an-object-passed-to-a-collaborator/
.. and here is more: http://docs.mockito.googlecode.com/hg/org/mockito/ArgumentCaptor.html
http://mockito.googlecode.com/svn/branches/1.8.0/javadoc/org/mockito/Mockito.html#15
when i have enough time, i will publish my own test examples..until then, i must say, unit testing with mockito framework is a great way of doing white box testing and this experience leads you to review & refactor your code accordingly..
Hiç yorum yok:
Yorum Gönder