Reputation: 15504
Is there any option in AssertJ to make deep assertion of 2-d (N-d) arrays? Pretty much the same as java.util.Arrays#deepEquals()
does but with assertion exception and prettified fail message like "element arr1[i][j] expected to be X, but was Y"
Here i found only 1d arrays assertions:
Upvotes: 0
Views: 1174
Reputation: 8056
There is a isDeepEqualTo()
method available since 3.17.0.
Check out Array2DAssertionsExamples
Upvotes: 2
Reputation: 7066
Unfortunately, there is no such feature in AssertJ but contributions are welcome. I voted for Kevin Welker suggestion.
Upvotes: 1
Reputation: 7937
I don't see one, but you could write your own with: AbstractAssert, or using a Comparator and the usingComparator method
Upvotes: 1