Migrate System Rules to System Stubs
MSALReplaces System Rules' ProvideSystemProperty, ClearSystemProperties, RestoreSystemProperties, SystemOutRule, SystemErrRule, StandardOutputStreamLog, StandardErrorStreamLog, DisallowWriteToSystemOut, DisallowWriteToSystemErr and TextFromStandardInputStream rules with @SystemStub fields of the System Stubs JUnit Jupiter extension. A rule is only migrated when every use of it has a System Stubs equivalent; other rules get a TODO comment.
org. openrewrite. java. testing. junit5. SystemRulesToSystemStubsmod run . --recipe= org. openrewrite. java. testing. junit5. SystemRulesToSystemStubsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.