[ https://issues.apache.org/jira/browse/LUCENE-10662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17573163#comment-17573163 ]
Marios Trivyzas commented on LUCENE-10662: ------------------------------------------ Correct me if I'm wrong, but with your suggestion the `MyLuceneTestCase` is still extending from `org.junit.Assert` and you would need to define in it [all the different variants of `assertThat` |https://www.javadoc.io/doc/org.assertj/assertj-core/3.8.0/org/assertj/core/api/Assertions.html] and also keep this class in sync when you update the assertj lib (probably not an issues as those methods are pretty much stable). I'm not trying to force this change to Lucene, we can live with a workaround, my thoughts though are that it would be nice for Lucene as well to remove this hard dependency and be able to use different libraries for assertions (if it's not assertj maybe something even better in the future). > Make LuceneTestCase to not extend from org.junit.Assert > ------------------------------------------------------- > > Key: LUCENE-10662 > URL: https://issues.apache.org/jira/browse/LUCENE-10662 > Project: Lucene - Core > Issue Type: Test > Components: general/test > Reporter: Marios Trivyzas > Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > Since *LuceneTestCase* is a very useful abstract class that can be extended > and used by many projects, having it extending *org.junit.Assert* limits all > users to exclusively use the static methods of {*}org.junit.Assert{*}. In our > project we want to use [https://joel-costigliola.github.io/assertj] where the > main method to call is *org.assertj.core.api.Assertions.assertThat* which > conflicts with the deprecated {*}org.junit.Assert.assertThat{*}, recognized > by default by the compiler. So one can only use assertj if on every call uses > fully qualified name for the *assertThat* method, i.e. > > {code:java} > org.assertj.core.api.Assertions.assertThat(myObj.name()).isEqualTo(expectedName) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org