Migrate Hamcrest assertions to AssertJ

Migrate all existing `assertThat(..., Matcher)` assertions to AssertJ
and add checkstyle rules to ensure they don't return.

See gh-23022
This commit is contained in:
Phillip Webb
2019-05-23 15:48:03 -07:00
parent 2294625cf0
commit 95a9d46a87
322 changed files with 4358 additions and 4814 deletions

View File

@@ -95,10 +95,17 @@
<property name="sortStaticImportsAlphabetically" value="true" />
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
<property name="id" value="bannedImports"/>
<property name="regexp" value="true" />
<property name="illegalClasses"
value="^reactor\.core\.support\.Assert,^junit\.framework\..+,^org\.junit\.Assert$,^org\.junit\.Assume$,^org\.junit\.Assert\.assertThat,^org\.junit\.Assume\.assumeThat,^org\.junit\.rules\.ExpectedException,^org\.slf4j\.LoggerFactory" />
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
<property name="id" value="bannedHamcrestImports"/>
<property name="regexp" value="true" />
<property name="illegalClasses"
value="^org\.hamcrest\.MatcherAssert" />
</module>
<!-- Javadoc Comments -->
<module name="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck">