Migrate TestNG assertions to AssertJ

MSAL

Convert assertions from org.testng.Assert to org.assertj.core.api.Assertions.

org.openrewrite.java.testing.testng.TestNgToAssertj
mod run . --recipe=org.openrewrite.java.testing.testng.TestNgToAssertj

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. Add Gradle or Maven dependency org.assertj:assertj-core:3.x
  2. Refaster rules that replace TestNG APIs with AssertJ equivalents
  3. TestNG assertEquals to AssertJ
  4. TestNG assertNotEquals to AssertJ
  5. TestNG assertEqualsNoOrder to AssertJ
  6. TestNG assertEqualsDeep/assertNotEqualsDeep to AssertJ
  7. TestNG assertSame to AssertJ
  8. TestNG assertNotSame to AssertJ
  9. TestNG assertThrows/expectThrows to AssertJ
  10. TestNG assertList* to AssertJ
  11. TestNG Assertion to AssertJ
  12. TestNG SoftAssert to AssertJ SoftAssertions
  13. Change type SoftAssert to SoftAssertions
  14. Use static import org.assertj.core.api.Assertions *(..)