Tuesday, January 27, 2015

Book Review: Mockito Essentials

Book Review: Mockito Essentials by Sujoy Acharya

Mockito essentials is a straightforward insight towards writing proper form of unit tests using mockito framework. Targeted at existing developers, this book goes beyond the documented library and explains the method of correctly writing unit tests and its corresponding code.
The book starts by introducing test doubles, or assumptions that we make while writing unit tests which is essentially done through mockito, effectively laying the foundation of the book. Two subsequent chapters are devoted to the innards of the framework - which is very handy if you have mockito's programming reference ready.
However, the main problem of unit test lies in its implementation as real world code is generally not testable and often is unchangeable. Using mockito under BDD tests is also worth mentioning as this concept is not covered elsewhere till now. The book concludes with implementation of mockito based tests over webservices and rich client applications.
Overall, the book not only covers the mockito framework but also covers practical advice regarding testing existing code and making both legacy and new code testable and I'd highly recommend this book if you are looking to write unit tests in java applications.



Disclaimer: I received a copy of this book from packt publication before doing a review.
Access the book here:
http://bit.ly/1IoUXzo

No comments: