Unit testen verifieert individuele units van code (functies, methoden, klassen) in isolatie — controleerend dat elk klein stukje correct op zichzelf werkt. Unit tests zijn snel, gericht, en vormen de basis van een goede teststrategie.
Wat een unit test is
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
