Mockito Cookbook

Over 65 recipes to get you up and running with unit testing using Mockito.

Mockito Cookbook

Marcin Grzejszczak

Over 65 recipes to get you up and running with unit testing using Mockito.
Packt Subscription
FREE
$9.99/m after trial
eBook
$18.90
RRP $26.99
Save 29%
Print + eBook
$43.99
RRP $43.99
What do I get with a Packt subscription?
  • Exclusive monthly discount - no contract
  • Unlimited access to entire Packt library of 6500+ eBooks and Videos
  • 120 new titles added every month, on new and emerging tech
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the subscription reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the subscription reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the subscription reader
$0.00
$18.90
$43.99
$9.99 p/m after trial
RRP $26.99
RRP $43.99
Subscription
eBook
Print + eBook
Start a FREE 10-day trial

Frequently bought together


Mockito Cookbook Book Cover
Mockito Cookbook
$ 26.99
$ 18.90
Mockito Essentials Book Cover
Mockito Essentials
$ 17.99
$ 12.60
Buy 2 for $31.50
Save $13.48
Add to Cart

Book Details

ISBN 139781783982745
Paperback284 pages

Book Description

Mockito is a testing framework that allows you to easily create test doubles (mocks) of the system under test's collaborators. You can use mocks to better simulate the behavioral patterns of your software in isolation to receive feedback from tests as soon as possible.

This book consists of recipes that depict the usage of a vast majority of Mockito functionalities in real-life examples. It goes beyond the documentation and covers how Mockito works and shows the steps to write effective tests using Mockito. This is a focused guide with lots of practical recipes of business issues and presentation of the entire test of the system. This book shows the use of Mockito's popular unit testing frameworks such as JUnit, PowerMock, TestNG, and so on.

Table of Contents

What You Will Learn

  • Create beautiful tests using Mockito
  • Create mocks and spies in a number of ways
  • Implement best practices to perform tests with Mockito
  • Extend Mockito with other popular Java-based unit testing frameworks such as JUnit and PowerMock
  • Stub behavior of mocks and spies
  • Verify test doubles with Mockito
  • Write good tests using Mockito
  • Integrate Mockito with DI systems
  • Compare Mockito to other mocking frameworks
  • Verify the behavior of your system under test

Authors

Table of Contents

Book Details

ISBN 139781783982745
Paperback284 pages
Read More

Read More Reviews

Recommended for You

Mockito Essentials Book Cover
Mockito Essentials
$ 17.99
$ 12.60
Learning Spring Boot 2.0 - Second Edition Book Cover
Learning Spring Boot 2.0 - Second Edition
$ 35.99
$ 25.20
Mastering Software Testing with JUnit 5 Book Cover
Mastering Software Testing with JUnit 5
$ 35.99
$ 25.20
Mockito for Spring Book Cover
Mockito for Spring
$ 14.99
$ 10.50
Jenkins 2.x Continuous Integration Cookbook - Third Edition Book Cover
Jenkins 2.x Continuous Integration Cookbook - Third Edition
$ 39.99
$ 28.00
Apache Maven Cookbook Book Cover
Apache Maven Cookbook
$ 39.99
$ 28.00