Book Image

Mockito Cookbook

By : Marcin Grzejszczak
Book Image

Mockito Cookbook

By: Marcin Grzejszczak

Overview of this book

Table of Contents (17 chapters)
Mockito Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 6. Verifying Test Doubles

In this chapter, we will cover the following topics:

  • Verifying the method invocation count with times()

  • Verifying the method invocation count with atLeast()

  • Verifying the method invocation count with atMost()

  • Verifying that interactions never happened

  • Verifying that interactions stopped happening

  • Verifying the order of interactions

  • Verifying interactions and ignoring stubbed methods

  • Verifying the method invocation within the specified time