Testowanie jednostkowe weryfikuje poszczególne jednostki kodu (funkcje, metody, klasy) w izolacji — sprawdzając, że każdy mały fragment działa poprawnie samodzielnie. Testy jednostkowe są szybkie, skoncentrowane i stanowią fundament dobrej strategii testowania.
Czym jest test jednostkowy
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
