Migrate Gatling Choice.withKey and Choice.withWeight

MSAL

Gatling 3.11 removed the Java SDK's Choice.withKey and Choice.withWeight used with doSwitch and randomSwitch. Rewrite Choice.withKey(key, chain) to onCase(key).then(chain) and Choice.withWeight(weight, chain) to percent(weight).then(chain).

org.openrewrite.java.testing.gatling.MigrateGatlingChoice
mod run . --recipe=org.openrewrite.java.testing.gatling.MigrateGatlingChoice

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