Skip to content

Migrate the tests from JUnit 4 to JUnit 5 - #121

Merged
flemming-n-larsen merged 1 commit into
mainfrom
junit5
Nov 1, 2026
Merged

flemming-n-larsen merged 1 commit into
mainfrom
junit5

Conversation

@flemming-n-larsen

Copy link
Copy Markdown
Member

Moves all tests to JUnit 5.14.4 and the Jupiter API. Tests still run on Java 8, as JUnit 5 supports it, while JUnit 6 would need Java 17. The 126 tests pass on Java 8 and 25 locally. Only the names of the TestScore tests change, apart from the () that Jupiter adds.

Most of it is mechanical: messages move last in assertions, and @Test(expected = ...) becomes assertThrows. TestRandom.before() now has @BeforeEach, as Jupiter would otherwise skip a method that overrides one without the annotation.

@flemming-n-larsen
flemming-n-larsen merged commit 2330fe9 into main Nov 1, 2026
2 checks passed
@flemming-n-larsen
flemming-n-larsen deleted the junit5 branch November 1, 2026 18:59
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.

1 participant