Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Support for Java 8 and AssertJ 3.x? #29

Closed
bcalmac opened this issue Dec 14, 2015 · 6 comments
Closed

Support for Java 8 and AssertJ 3.x? #29

bcalmac opened this issue Dec 14, 2015 · 6 comments
Milestone

Comments

@bcalmac
Copy link

bcalmac commented Dec 14, 2015

From the pom.xml dependency for assertj-core [2.1.0, 2.99.0] I infer that assertj-guava is not compatible with AssertJ 3.x and Java 8. Are there current plans to get it working?

I tried to see if it works anyway (assertj-guava 2.0.0 + assertj-core 3.2.0) and the following test:

    @Test
    public void assertjMultimapTest() {
        assertThat(ImmutableListMultimap.of(6, "Mickey", 6, "Minnie", 3, "Goofy"))
            .hasSameEntriesAs(ImmutableListMultimap.of(6, "Mickey", 6, "Minnie", 5, "Goofy"));
    }

fails with the exception below. It looks related to type inference changes from Java 8.

java.lang.NoSuchMethodError: org.assertj.core.error.ShouldContainOnly.shouldContainOnly(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Iterable;)Lorg/assertj/core/error/ErrorMessageFactory;

    at org.assertj.guava.api.MultimapAssert.hasSameEntriesAs(MultimapAssert.java:286)
    at com.panduit.util.stream.PCollectorsTest.assertjMultimapTest(PCollectorsTest.java:15)
@joel-costigliola
Copy link
Member

@bcalmac I will release by the end of the year a new assertj-guava version (probably 3.0.0) compatible with assertj-core 3.x. version.

@joel-costigliola joel-costigliola added this to the 3.0.0 milestone Dec 15, 2015
@bcalmac
Copy link
Author

bcalmac commented Dec 15, 2015

Good timing :-) If there's any way I can help, let me know.

@joel-costigliola
Copy link
Member

Well, I was expecting someone to (rightfully) complain ;-)

@joel-costigliola
Copy link
Member

AssertJ Guava 3.0.0 released.
Can you give it a try ?

@bcalmac
Copy link
Author

bcalmac commented Dec 21, 2015

My test case works now, thanks.

@joel-costigliola
Copy link
Member

Thanks for the feedback 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants