test: Migrate all the template tests to Junit5 #3986
Merged
+61
−61
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.
#3919
Hi, this PR involves pure refactoring.
I will be working on
templateTest
next hence raised the PR for migration.In one of my previous migrations, @slarse gave a green flag for migration PR(s) involving 100 changes (50 additions - 50 deletions), so as I needed to migrate
templateTest
, I thought it would be nice to migrate all the tests in the template directory.Ik this PR involves 61 additions & deletions which are more than suggested, but the changes are pretty simple.
This PR just involves these three types of changes:
changing imports
In some assertions due to the Junit5 rules, the order of the parameters changed with the output message parameter moved as the last parameter.
Junit5 doesn't support
assertThat
, so I have replaced its import withimport static org.hamcrest.MatcherAssert.assertThat;
this is also suggested in the official Junit5 documentation.I hope 61 additions will not be difficult to review 😅