Instant Mockito

Learn how to create stubs, mocks, and spies and verify their behavior using Mockito

Instant Mockito

Marcin Grzejszczak

1 customer reviews
Learn how to create stubs, mocks, and spies and verify their behavior using Mockito
Mapt Subscription
FREE
$30.00/m after trial
eBook
$9.10
RRP $12.99
Save 29%
What do I get with a Mapt subscription?
  • Unlimited access to all Packt’s 6,000+ eBooks and Videos
  • 100+ new titles a month, learning paths, assessments & code files
  • 1 Free eBook or Video to download and keep every month after trial
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
$9.10
$29.99 p/m after trial
RRP $12.99
Subscription
eBook
Start 14 Day Trial

Frequently bought together


Instant Mockito Book Cover
Instant Mockito
$ 12.99
$ 9.10
Mockito Essentials Book Cover
Mockito Essentials
$ 17.99
$ 12.60
Buy 2 for $21.70
Save $9.28
Add to Cart

Book Details

ISBN 139781782167976
Paperback66 pages

Book Description

Mockito is an open source testing framework for Java that automates unit tests for use in test-driven development (TDD) or behavior-driven development (BDD), decoupling test code from the system under test by eliminating the expect-run-verify pattern. It lets you write beautiful tests with a clean and simple API.

Instant Mockito contains plenty of real-life examples on how to unit test your code. It shows you how to use this testing framework and explains best practices on how to use it effectively.

Instant Mockito helps you break each significant method into a set of practical examples. It will clarify all the concepts of unit testing and Mockito.

You will learn how to properly capture and verify arguments passed into your stubbed methods. We will also take a look at verifying an order and returning custom answers on the stubs. If you want to take advantage of using the Mockito framework’s API to tame your code base, then this is the book for you.

You will learn everything you need to know to unit test your code in a clear, readable, and high quality manner.

What You Will Learn

  • Create stubs, mocks, and spies
  • Perform argument matching
  • Work with void methods and thrown exceptions
  • Perform stubbing with a custom answer
  • Verify the behaviour of mocks
  • Perform argument capturing
  • Verify the call order
  • Work with asynchronous code
  • Learn about partial mocking
  • Reduce boilerplate code with annotations
  • Learn about advanced mock configuration

Authors

Book Details

ISBN 139781782167976
Paperback66 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Mockito Essentials Book Cover
Mockito Essentials
$ 17.99
$ 12.60
Mockito Cookbook Book Cover
Mockito Cookbook
$ 26.99
$ 18.90
Mockito for Spring Book Cover
Mockito for Spring
$ 14.99
$ 10.50
Mastering Unit Testing Using Mockito and JUnit Book Cover
Mastering Unit Testing Using Mockito and JUnit
$ 26.99
$ 18.90
Test-Driven Development with Mockito Book Cover
Test-Driven Development with Mockito
$ 23.99
$ 16.80
Instant Mock Testing with PowerMock Book Cover
Instant Mock Testing with PowerMock
$ 14.99
$ 10.50