Test doubles janë objekte që zëvendësojnë varësitë reale në teste — përfshirë mocks, stubs, spies, fakes, dhe dummies. Ato izolojnë kodin nën test nga varësitë e tij (bazat e të dhënave, APIs, shërbimet), duke mundësuar teste njësi të shpejtë, të fokusuar dhe të kontrolluara.
Përse test doubles
To test a unit in ISOLATION, replace its real dependencies (DB, API, services) with
TEST DOUBLES (fake stand-ins):
→ isolate the unit (test ONLY it, not its dependencies)
→ FAST (no real DB/network); CONTROLLED (set up exact scenarios, including errors);
DETERMINISTIC (no external flakiness)
