Asercje to instrukcje w teście, które sprawdzają, czy warunek jest prawdziwy — weryfikując, że rzeczywisty wynik odpowiada oczekiwanemu wynikowi. Stanowią rdzeń sposobu, w jaki testy określają powodzenie lub porażkę: jeśli asercja się nie powiedzie, test się nie powiedzie.
Co robią asercje
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).
