Migrate Hamcrest assertions to JUnit Jupiter

MSAL

Migrate Hamcrest assertThat(..) to JUnit Jupiter Assertions.

org.openrewrite.java.testing.hamcrest.MigrateHamcrestToJUnit5
mod run . --recipe=org.openrewrite.java.testing.hamcrest.MigrateHamcrestToJUnit5

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Use consistent Hamcrest matcher imports
  2. Reorder method arguments
  3. Change method name org.hamcrest.MatcherAssert assertThat(boolean, String) to assertTrue
  4. Change method target to static
  5. Migrate from Hamcrest instanceOf matcher to JUnit 5
  6. Migrate from Hamcrest Matcher to JUnit 5