JUnit Jupiter migration #15
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR upgrades the project to use the modern JUnit Jupiter 5.9.1 in order to make it easier for future contributors to write and maintain tests.
It includes:
junit:junit:4.10
with the modernorg.junit.jupiter:junit-jupiter.5.9.0
.org.apache.maven.plugins:maven-surefire-plugin:2.22.2
dependency in order to execute JUnit Jupiter tests.org.junit.jupiter.api.Test
was used as a drop-in replacement fororg.junit.Test
in the simple case where the annotation takes no arguments. In the cases theexpected
argument was used the annotation was still replaced, but the assertions had to also be changed, see 3.ii. below.org.junit.jupiter.api.BeforeEach
was used as a drop-in replacement fororg.junit.Before
.org.junit.jupiter.api.BeforeAll
was used as a drop-in replacement fororg.junit.BeforeAll
.org.junit.jupiter.api.Assertions
were used as drop-in replacements for the methods oforg.junit.Assert
with the same name.org.junit.jupiter.api.Assertions
'assertThrows
was used as a replacement for theorg.junit.Test
annotation with anexpected
argument.