Transform Assume methods to Assumptions

MSAL

Transform Assume methods without a direct counterpart to equivalent assumptions in Assumptions.

org.openrewrite.java.testing.junit5.AssumeNotNullToAssumptionsRecipes
mod run . --recipe=org.openrewrite.java.testing.junit5.AssumeNotNullToAssumptionsRecipes

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. Transform single-argument assumeNotNull(object) to assumeFalse(object == null)
  2. Transform variadic assumeNotNull(objects...) to a stream of assumeFalse(object == null)
  3. Transform assumeNoException(throwable) to assumeTrue(throwable == null)
  4. Transform assumeNoException(message, throwable) to assumeTrue(throwable == null, message)