Assertions: assertArrayEquals() and assertIterableEquals()
Let's describe the assertArrayEquals() and assertIterableEquals() methods in JUnit 5.
The assertArrayEquals() method
The assertArrayEquals() method asserts that two given arrays are equal. It supports arrays of type boolean[], char[], byte[], short[], int[], long[], float[], double[], and Object[].
- If the
actualandexpectedarrays are equal, the test case passes. - If the
actualand
Ask