Mock

A Mock is a type of test double used in software testing to simulate the behaviour of a component during tests. Mocks allow developers to isolate specific parts of a system while testing others.

Key Features:

  • Behaviour Simulation: Mimics expected interactions with a component.
  • Controlled Responses: Provides predefined outputs based on inputs during tests.
  • Isolation: Allows testing without dependencies on external systems or components.

Mocks are commonly used in unit testing to verify that specific functions behave as expected without relying on actual implementations.