Simplify AssertJ assertions on an array's length
MSALReplace assertThat(array.length) size assertions with the dedicated array assertions, such as assertThat(array).hasSize(n), assertThat(array).isEmpty() and assertThat(array).hasSameSizeAs(other). Works for both object and primitive arrays.
org. openrewrite. java. testing. assertj. SimplifyArrayLengthAssertionmod run . --recipe= org. openrewrite. java. testing. assertj. SimplifyArrayLengthAssertionInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.