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
Packt Subscription
$5.00
$9.99/m after first month
eBook
$5.00
RRP $12.99
Save 61%
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
$5.00
$5.00
$9.99/m after first month
RRP $12.99
Subscription
eBook
Subscribe Now

Frequently bought together


Instant Mockito Book Cover
Instant Mockito
$ 12.99
$ 5.00
Learning Android Application Testing Book Cover
Learning Android Application Testing
$ 39.99
$ 5.00
Buy 2 for $10.00
Save $42.98
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

Learning Android Application Testing Book Cover
Learning Android Application Testing
$ 39.99
$ 5.00
Mastering Unit Testing Using Mockito and JUnit Book Cover
Mastering Unit Testing Using Mockito and JUnit
$ 26.99
$ 5.00
Mockito Essentials Book Cover
Mockito Essentials
$ 17.99
$ 5.00
Java EE 8 Application Development Book Cover
Java EE 8 Application Development
$ 39.99
$ 5.00
Java EE 8 and Angular Book Cover
Java EE 8 and Angular
$ 35.99
$ 5.00
Java EE 8 Application Development Book Cover
Java EE 8 Application Development
$ 39.99
$ 5.00