Closed vpavic closed 5 months ago
Analogous to the allowed import BDDMockito
This isn't quite the same as we're opinionated about the use of BDDMockito
:
Arguably, we're also opinionated (although less so) about AssertJ as we're currently steering people towards assertThat
. I'm not sure about making it easier for people to mix the two AssertJ styles or about moving to BDD-style AssertJ across the board. I'll see what the team thinks.
While I'm not so keen to use this ourselves (due to the potential clash with Mockito), I don't think it's a bad thing to allow the import for those that want to use it. Folks can always add a rule to ban the import in their own code (much like we do with assertThatThrownBy
in Spring Boot.
Analogous to the allowed import
BDDMockito
, Spring JavaFormat should also allow static import of AssertJ'sBDDAssertions
.Note that there's an additional commit in this PR that removes a duplicate exclude that has sneaked in.