Assertions zijn statements in een test die controleren of een voorwaarde waar is — verifiëren dat het werkelijke resultaat overeenkomt met het verwachte resultaat. Ze vormen de kern van hoe tests bepalen of ze slagen of falen: als een assertion faalt, faalt de test.
Wat assertions doen
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).
