test double
A stand-in for a real dependency, used so a test can run without it.
A test double (fake, stub, or mock) implements the same trait as the real dependency, so code written against the trait can be tested without a network, clock, or disk.
Examples
struct FixedClock(u32)implements the sameClocktrait asSystemClock, so a test can checkoverdue(98, &FixedClock(101))on a day it chooses.
See also