-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate tests to JUnit5 #389
Migrate tests to JUnit5 #389
Conversation
69917af
to
778d32a
Compare
* Migrate annotations and imports * Migrate assertions * Remove public visibility for test classes and methods * Minor clean up
778d32a
to
7d23a22
Compare
@@ -114,13 +118,13 @@ private static void testCycle(String macroName, Integer macroId, String[] parame | |||
} | |||
|
|||
private static void assertEquals(Macro expected, Macro actual) { | |||
Assert.assertEquals("Wrong name", expected.getName(), expected.getName()); | |||
Assert.assertEquals("Wrong index", expected.getIndex(), expected.getIndex()); | |||
Assertions.assertEquals(expected.getName(), actual.getName(), "Wrong name"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we statically import the assertEquals
and use it like that in this file. Then we're in sync with all other files how to import the Assertions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't since it would ambiguous with the surrounding method MacroTest#assertEquals(Macro, Macro)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a right
This PR aims to migrate all tests to JUnit5. Changes include:
Some tests fail due to jenkinsci/jenkins-test-harness#901 which will likely be fixed in plugin-pom 5.7. I'll update the PR once it is available.Some tests fail due to jenkinsci/configuration-as-code-plugin#2637 which will likely be fixed in an upcoming release of
configuration-as-code-plugin
via bom. I'll update the PR once it is available.I am well aware that this is a quite large changeset however I hope that there is still interest in this PR and it will be reviewed.
If there are any questions, please do not hesitate to ping me.