Assertions sind Anweisungen in einem Test, die überprüfen, ob eine Bedingung wahr ist — verifying that the actual result matches the expected result. Sie sind der Kern dessen, wie Tests bestimmen, ob sie bestanden oder fehlgeschlagen sind: Wenn eine Assertion fehlschlägt, schlägt der Test fehl.
Was Assertions tun
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).
