jargon

Architecture & practice·Design, structure and tradeoffs

you needed to test the payment path and there was nowhere to slip a fake in without editing the code you were testing.

Seam

Also calledtest seam, injection point

A place where you can change behaviour without editing the code at that place — a parameter, an interface, a configuration point. Seams are what make legacy code testable, because they are where a real dependency can be replaced with a fake. Finding or creating a seam is usually the first move when changing code nobody dares touch, and the absence of seams is exactly what makes such code frightening.

Commonly confused with