Vieneto testavimas patikrina atskirus vienetus kodo (funkcijas, metodus, klases) izoliuotai — tikrinant, kad kiekvienas mažas gabalas veikia teisingai atskirai. Vieneto testai yra greitai atliekami, sutelkti, ir sudaro geros testavimo strategijos pagrindą.
Kas yra vieneto testas
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
