Migrate System Rules to System Stubs

MSAL

Replaces 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.SystemRulesToSystemStubs
mod run . --recipe=org.openrewrite.java.testing.junit5.SystemRulesToSystemStubs

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.