Skip to content

see #24924 - migrate the tests from JUnit 4 to JUnit 5 - #8

Merged
stoecker merged 2 commits into
JOSM:masterfrom
gabortim:junit5-migration
Nov 11, 2026
Merged

stoecker merged 2 commits into
JOSM:masterfrom
gabortim:junit5-migration

Conversation

@gabortim

Copy link
Copy Markdown
Contributor

JOSM core drops JUnit 4 support from JOSMTestRules, so the @Rule fields in MarkSeenRootTest and QuadTreeMetaAutoOptimizeTest would fail with "must implement MethodRule or TestRule".

  • @RunWith(Parameterized.class) -> @ParameterizedClass with constructor injection
  • @Rule JOSMTestRules -> @Main, @FullPreferences, @Projection, @FakeImagery, @Timeout
  • @Ignore, @Before/@After, @Test(expected/timeout) and assertion argument order migrated with the OpenRewrite JUnit4to5Migration recipe
  • drop junit-vintage-engine

JOSM core drops JUnit 4 support from JOSMTestRules, so the @rule fields in
MarkSeenRootTest and QuadTreeMetaAutoOptimizeTest would fail with "must
implement MethodRule or TestRule".

- @RunWith(Parameterized.class) -> @ParameterizedClass with constructor injection
- @rule JOSMTestRules -> @main, @FullPreferences, @Projection, @FakeImagery, @timeout
- @ignore, @Before/@after, @test(expected/timeout) and assertion argument order
  migrated with the OpenRewrite JUnit4to5Migration recipe
- drop junit-vintage-engine
@stoecker
stoecker merged commit d0349a4 into JOSM:master Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants