oslac

Search

Search IconIcon to open search

Types of Test Doubles

Published: Jun 1, 2023
Updated: Jun 3, 2023

Summary

A test double is an object that can stand in for a real object in a test.

There are different types of test doubles and they all have a different purpose. A fake is preferred over other test double techniques such as mocks or stubs because a fake behaves similarly to the real implementation. System-Under-Test should not be able to tell whether it is interacting with a real implementation or a fake.

See Also