Migrate System Rules ExpectedSystemExit to System Stubs catchSystemExit(..)
MSALReplaces System Rules' ExpectedSystemExit rule with System Stubs' catchSystemExit(..), which runs the rest of the test in a lambda and returns the exit status for an assertEquals(..). Assertions registered through checkAssertionAfterwards(..) are inlined after it. Rules that other classes may use, or that set expectations outside of the test method body, get a TODO comment instead.
org. openrewrite. java. testing. junit5. ExpectedSystemExitToCatchSystemExitmod run . --recipe= org. openrewrite. java. testing. junit5. ExpectedSystemExitToCatchSystemExitInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.