Skip to content

I20240112-0450

@HeikoKlare HeikoKlare tagged this 11 Jan 18:05
In order to reduce/avoid usage of ambiguous `assertEquals` (hard to
distinguish expected/actual) and prepare for a migration to JUnit 5 with
swapped expected/actual parameters in the `assertEquals` signature, this
change replaces certain `assertEquals` calls:
* Replace `assertEquals(MESSAGE, EXPECTED, ACTUAL.length)` with
`assertThat(MESSAGE, ACTUAL, arrayWithSize(EXPECTED))` and remove
obsolete message where possible
* Replace `assertEquals(EXPECTED, ACTUAL.length)` with
`assertThat(ACTUAL.length, is(EXPECTED))` if `ACTUAL` is a primitive
type array
* Replace `arrayWithSize(0)` with `emptyArray()` to improve failure
messages
* Combine array size comparison with array contents comparison where
possible
Assets 2
Loading