I have this test with JUnit 4 assertions:
var actual = valueCaptor.getAllValues();
var expected = List.of(new String[] { "1", " A" }, new String[] { "2", " B" }, new String[] { "3", " C" });
for (int i = 0; i < expected.size(); i++) {
org.junit.Assert.assertArrayEquals(expected.get(i), actual.get(i));
}
I would like to use JUnit 5 assertions, and I have tried:
Assertions.assertIterableEquals(expected, actual);
But it fails, because the actual arrays are different objects than the expected ones. Is there a way to convert my JUnit 4 assertions in a more concise way with JUnit 5?