Testing best practices

MSAL

Wraps the statements of tests without assertions in assertDoesNotThrow(..) and removes the test prefix from JUnit 5 test method names.

org.openrewrite.java.testing.cleanup.BestPractices
mod run . --recipe=org.openrewrite.java.testing.cleanup.BestPractices

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. Include an assertion in tests
  2. Remove test prefix from JUnit 5 tests