This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
as you have rightly noticed Mockito has a really impressive documentation. It wasn't my intention to repeat what is already written there, as such book would be rather useless. This is why I haven't concentrated on syntax and list of features, which are easily to be found on the net. Obviously, I introduce a great deal of Mockito (I would say that after reading the book you will know everything what is required to write 99% of tests, excluding some really specific cases) but what I really tried to do, is to show how to use mocks in intelligible way.
Below I put a short description of the book content with regard to mocking (copied from another thread):
Tomek Kaczanowski wrote:
As for the book, it definitely discusses mocking. There is a separate chapter (~50 pages) devoted solely to dealing with collaborators (it also introduces Mockito and ends with a detailed example of TDD+Mockito). Then, in consecutive chapters there are selected sections devoted to specific mocking-related issues: stubbing of void methods, using of Mockito matchers, dealing with "new" operator and capturing of arguments passed to collaborators, syntactic sugar of Mockito (Mockito annotations and BDD support). There are also some hints and comments regarding tests with mocks within the last chapters which are related to tests quality and maintainability issues (BTW. you can find book's ToC on book's site).
Please bear in mind, that the book is aimed rather at people who start writing tests (or who failed at such attempts). I'm pretty sure that even as a seasoned Mockito user you would find a lot of interesting things there, but maybe not directly related to Mockito.
Book author: Practical Unit Testing with TestNG and Mockito
Joined: Mar 27, 2006
Thank you for answering my question. I also checked your website and the table of contents for your book. We advocate TDD and BDD to our clients and I think the material will be useful for me and others at my company. Thanks for putting all this information together and good luck with your book!