Teste unitário verifica unidades individuais de código (funções, métodos, classes) em isolamento — verificando que cada pequena parte funciona corretamente por si só. Testes unitários são rápidos, focados e formam a base de uma boa estratégia de testes.
O que é um teste unitário
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
