Skip to content
New issue

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

assertThat(Map).containsEntry(...) throws NoSuchMethodError with AssertJ 3.25 #216

Open
torstenmandry opened this issue Jun 6, 2024 · 0 comments
Assignees
Milestone

Comments

@torstenmandry
Copy link

We're using assertj-vavr for various assertions in our spring-boot project.

With the recently published spring-boot version 3.3.0 the managed assertj version was updated to 3.25.0.

With this update, when running a test like

@Test
void assertThatMapContainsEntry() {
    VavrAssertions.assertThat(HashMap.of("key", "value"))
            .containsEntry("key", "value");
}

the following exception is thrown

java.lang.NoSuchMethodError: 'void org.assertj.core.internal.CommonValidations.failIfEmptySinceActualIsNotEmpty(java.lang.Object[])'
	at org.assertj.vavr.internal.Maps.assertContains(Maps.java:117)
	at org.assertj.vavr.api.AbstractMapAssert.containsEntry(AbstractMapAssert.java:172)
	at ...

It looks like the latest assertj-vavr release (0.4.3) ist not compatible with assertj 3.25.0.

Although, in the commit history of this git repository I can see, that there were updates to assertj-core 3.25 and higher. Maybe it's just a new release that is missing?

@mchmielarz mchmielarz self-assigned this Oct 26, 2024
@mchmielarz mchmielarz added this to the v0.4.4 milestone Oct 26, 2024
@mchmielarz mchmielarz removed the bug label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants