We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug A clear and concise description of what the bug is.
Test case reproducing the bug
This code worked in AssertJ 3.24.2, but fails in AssertJ 3.25.0:
import static org.assertj.core.api.Assertions.assertThat; import org.junit.jupiter.api.Test; import java.util.Map; @Test void fails() { assertThat(Map.of("firstName", new String[] {"Bob"})) .containsExactlyEntriesOf(Map.of("firstName", new String[] {"Bob"})); }
This test fails with the error message:
java.lang.AssertionError: Actual and expected have the same elements but not in the same order, at index 0 actual element was: "firstName"=["Bob"] whereas expected element was: "firstName"=["Bob"] at play.utils.UtilsTest.fails(UtilsTest.java:50)
The text was updated successfully, but these errors were encountered:
Thanks for reporting it, @asolntsev!
Sorry, something went wrong.
The change that causes the issue is 498ee5b.
Here we assume that the map value can be compared with equals:
equals
assertj/assertj-core/src/main/java/org/assertj/core/internal/Maps.java
Line 572 in 25347d5
This cannot work with array values as equals compares identity and not the array's content.
assertContainsExactly
Team decision: 498ee5b should be reverted and #2165 should be addressed again with the knowledge gathered from this issue.
scordio
Successfully merging a pull request may close this issue.
Describe the bug
A clear and concise description of what the bug is.
Test case reproducing the bug
This code worked in AssertJ 3.24.2, but fails in AssertJ 3.25.0:
This test fails with the error message:
The text was updated successfully, but these errors were encountered: