Patvirtinimai yra testų sakiniai, kurie tikrina, ar sąlyga yra teisinga — patvirtina, kad faktinis rezultatas atitinka tikėtinąjį rezultatą. Jie yra pagrindinė testų dalis, nustatanti, ar testas praėjo ar nepraėjo: jei patvirtinimas nepavyksta, testas nepavyksta.
Ką patvirtinimai daro
An ASSERTION checks that something is as expected:
→ "assert that the actual value EQUALS the expected value"
→ if TRUE → the assertion passes; if FALSE → the assertion FAILS → the TEST FAILS
→ Assertions are how a test VERIFIES behavior (the "check" part of a test).
