← Back to Week 5

Pick the Assertion

Read the scenario, then choose the assertion that best verifies the result.

Score
0 / 0
Question
1 / 12
QUESTION 1 OF 12
Which assertion is the best fit?
GAME COMPLETE
Quick reference: assertTrue(x) for booleans you expect true, assertFalse(x) for booleans you expect false, assertEquals(expected, actual) for value equality, assertNotEquals when they should differ, and assertArrayEquals for arrays (regular assertEquals on arrays compares references, not contents!).

12 questions • Watch out for the array-equality trap.

← AAA Sort Static or Instance? →