Book Image

MOCKITO COOKBOOK

By : Grzejszczak
Book Image

MOCKITO COOKBOOK

By: Grzejszczak

Overview of this book

This is a focused guide with lots of practical recipes with presentations of business issues and presentation of the whole test of the system. This book shows the use of Mockito's popular unit testing frameworks such as JUnit, PowerMock, TestNG, and so on. If you are a software developer with no testing experience (especially with Mockito) and you want to start using Mockito in the most efficient way then this book is for you. This book assumes that you have a good knowledge level and understanding of Java-based unit testing frameworks.
Table of Contents (12 chapters)
11
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)