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 1. Getting Started with Mockito

In this chapter, we will cover the following recipes:

  • Adding Mockito to a project's classpath

  • Getting started with Mockito for JUnit

  • Getting started with Mockito for TestNG

  • Mockito best practices - test behavior, not implementation

  • Adding Mockito hints to exception messages in JUnit (Experimental)

  • Adding additional Mockito warnings to your tests in JUnit (Experimental)