Mockito Essentials

More Information
Learn
  • Explore test doubles and work with dummy, spy, fake, stub, and mock objects
  • Uncover the Mockito architecture and build a custom mocking framework
  • Mock, stub, and spy external code dependencies using Mockito
  • Practice Behavior-driven Development (BDD) with Mockito
  • Make legacy code testable by mocking and spying dependencies
  • Mock GWT and web service dependencies using Mockito
  • Discover argument captors, inline stubbing, and resetting mock objects
About

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.

Features
  • Explore Mockito features and learn stubbing, mocking and spying dependencies using the Mockito framework
  • Mock external dependencies for legacy and greenfield projects and create an automated JUnit safety net for building reliable, maintainable and testable software
  • A focused guide filled with examples and supporting illustrations on testing your software using Mockito
Page Count 214
Course Length 6 hours 25 minutes
ISBN 9781783983605
Date Of Publication 23 Oct 2014

Authors

Sujoy Acharya

Sujoy Acharya works as a Principal Engineer with Cerner. While growing up, he pursued his interests in the fields of computer science and engineering. His hobbies are watching movies and sitcoms, playing outdoor sports, and reading books.

Sujoy likes to research upcoming technologies. His major contributions are in the fields of TDD, building scalable applications, cloud services, and the Spring Framework.

He has authored four books for Packt, namely, Test-Driven Development with Mockito, Mastering Unit Testing using Mockito and JUnit, Mockito Essentials, and Mockito for Spring.