027: Stub – Test Doubles

This episode of Testing All The Things is the first in a series where we look at different forms of Test Doubles. We will look at a different type of Test Double in each of the videos. We will implement our own test doubles, we will not use a mocking framework.

We use Test Doubles to replace the dependencies a class uses in production so we have complete control over its dependencies enabling us to isolate the code under test from the implementation of its dependencies. In the video we look at the Stub type of Test Double.

The code produced during the Test Doubles episodes can be found on GitHub

Episode 002 – Stub Test Doubles

In episode 2 of Testing All The Things we start to exploring Test Doubles. Test doubles are used to isolate the code under test from its dependencies. Test doubles imitate the functionality of a dependency.

Creating test doubles do not require the use of a mocking framework. In the following videos we will not use a mocking framework so we can concentrate of the theory.

In the first video we are looking at the simplest form of Test Double, Stubs.