This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Testing and the fly likes Mockito Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Mockito" Watch "Mockito" New topic
Author

Mockito

Parag Katkar
Greenhorn

Joined: Mar 27, 2006
Posts: 5
Hi Tomek,

I have been doing TDD for several years and being a big fan of Mockito, I'm really excited about your book.

I'm familiar with the official Mockito documentation and examples and I'm interested in understanding what your book will offer apart from what's already explained in there.

Regards,

Parag Katkar
Tomek Kaczanowski
author
Ranch Hand

Joined: Oct 26, 2005
Posts: 40

Hi Parag,

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.


Tomek Kaczanowski
Book author: Practical Unit Testing with TestNG and Mockito
http://practicalunittesting.com
Parag Katkar
Greenhorn

Joined: Mar 27, 2006
Posts: 5
Hi Tomek,

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!

Regards,

Parag Katkar
 
 
subject: Mockito
 
Similar Threads
A mock for every dependency?
easymock, j2ee (struts 2) and debugging...
Tomek's opinion on Fowler's opinion on mocking...
How to test my proxy application on localhost?
New to JUnit. How to Write a Unit Testing Code?