Unit testing ověřuje jednotlivé jednotky kódu (funkce, metody, třídy) v izolaci — kontroluje, že každý malý kus funguje správně sám o sobě. Unit testy jsou rychlé, zaměřené a tvoří základy dobré testovací strategie.
Co je unit test
A UNIT test verifies the smallest testable piece (a function/method) in ISOLATION:
→ test ONE thing; give inputs, check the output/behavior
→ ISOLATED from dependencies (database, network, other units) — mock/stub those
→ FAST (no real I/O), focused, deterministic
