What do you think?


Mockito Essentials
A practical guide to get you up and running with unit testing using Mockito This book is ideal for developers who have some experience in Java application development as well as some basic knowledge of test doubles and JUnit testing. This book also introduces you to the fundamentals of JUnit testing, test doubles, refactoring legacy code, and writing JUnit tests for GWT and web services. Whether you are new to JUnit testing and mocking or a seasoned Mockito expert, this book will provide you with the skills you need to successfully build and maintain meaningful JUnit test cases and effectively mock external dependencies. At the beginning, this book deals with dummy and fake objects and then moves on to exploring stubs followed by an example on spying. Then, it will show you how to make legacy code testable, mock external dependencies using Mockito, and write testable code for greenfield projects. You will also gain an insight on the concepts of Service-oriented Architecture (SOA) as well as understand how to unit test RESTful web services with Mockito. By sequentially working through the steps in each chapter, you will quickly learn the features of Mockito. Mockito Essentials will ensure your success with these concepts, tools, and frameworks.
175 pages, Paperback
First published October 24, 2014
Ratings & Reviews
Friends & Following
Create a free account to discover what your friends think of this book!
Community Reviews
Displaying 1 - 1 of 1 review
January 25, 2015
Mockito Essentials is a good introductory book for those who start using Mockito and for those, who start their journey with unit testing in general.
The book is mainly focused on Mockito framework. It starts with quite a detailed introduction in what unit testing and test doubles are. Then, it gradually introduces features of the Mockito framework, starting with simple cases and finishing with special techniques to unit test SOAs and applications based on GWT. I guess those technologies were chosen to demonstrate how you can use the framework in the real life. Somewhere in between you will find the tips and tricks, along with explanations, on how Mockito can improve your unit testing techniques. You will also find two very useful chapters. One of them is focused on behavior driven development and how you can apply Mockito to carry out BDD. Another describes how one can use Mockito to unit test their legacy code. Both chapters are very helpful and a must read for this book, along with the chapter one. Of course, to understand how Mockito works, you have to read chapters two and three.
The book also includes working code examples, although I don’t agree with the approach of some of those examples.
I would recommend Mockito Essentials not only, because it is a good read, but also, because it one of the best books I’ve read about Mockito framework.
The book is mainly focused on Mockito framework. It starts with quite a detailed introduction in what unit testing and test doubles are. Then, it gradually introduces features of the Mockito framework, starting with simple cases and finishing with special techniques to unit test SOAs and applications based on GWT. I guess those technologies were chosen to demonstrate how you can use the framework in the real life. Somewhere in between you will find the tips and tricks, along with explanations, on how Mockito can improve your unit testing techniques. You will also find two very useful chapters. One of them is focused on behavior driven development and how you can apply Mockito to carry out BDD. Another describes how one can use Mockito to unit test their legacy code. Both chapters are very helpful and a must read for this book, along with the chapter one. Of course, to understand how Mockito works, you have to read chapters two and three.
The book also includes working code examples, although I don’t agree with the approach of some of those examples.
I would recommend Mockito Essentials not only, because it is a good read, but also, because it one of the best books I’ve read about Mockito framework.
Displaying 1 - 1 of 1 review

