Skip to content

Conversation

vlsi
Copy link

@vlsi vlsi commented Jun 3, 2025

This PR refactors the existing tests to JUnit 5.

Fixes #970
This is an alternative to #10285

The major migration was made with IDEA's "migrate JUnit 4 to 5", then I replaced @RunWith(Parameterized.class) with @ParameterizedClass.

There are still some leftovers:

  • for unknown reasons, JUnit 5 forces @Nested classes to be non-static: Can @Nested class be non-static? junit-team/junit-framework#4613
  • some of the classes still use @Rule public MockTestcontainersConfigurationRule
  • there is one @RunWith(MockitoJUnitRunner.class)
  • there are two @RunWith(BlockJUnit4ClassRunner.class)
  • there is one @RunWith(Suite.class)
  • there is one @RunWith(Enclosed.class)
  • there is on @RunWith(Cucumber.class)
  • the documentation still refers to junit4 patterns

@vlsi vlsi force-pushed the junit5_migrate branch 4 times, most recently from 6574921 to beb7963 Compare June 3, 2025 17:05
@vlsi vlsi force-pushed the junit5_migrate branch from beb7963 to 0ef58b5 Compare June 4, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment