-
Notifications
You must be signed in to change notification settings - Fork 49
Update the test to use JUnit 5 #81
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
Comments
This should now be changed to JUnit 5 😉 |
I've updated the description. @jorsol do you work on that or you just noticed the ticket. I ask because I've just started playing around with migrating to JUnit5. |
I just noticed the ticket, I wish to work on this but I don't have enough time to tackle this. |
* Migrate org.junit.* to org.junit.jupiter.api.* * Fix the assertions. In JUnit 5 the message is the last argument, not the first. Move all messages to the end of the arguments list. * Replace JUnit4 rules with JUnit 5 build-in extensions. * Remove dependency to hamcrest as it is used only in single test. Use the JUnit5 assertions instead. * Sisu's InjectedTest setup and tearDown methods are not annotated with the JUnit5 annotations - @beforeeach and @AfterEach. Override those methods in TestSupport and place the respective annotations so those methods are invoked before/after each test. * @beforeeach and @AfterEach are not inherited when the method is overridden. Place the appropriate annotation where there are such methods, so they are executed before/after each test. Closes #81
I've migrated the test and they work with JUnit 5. I think I'll do some obvious improvements that are supported in JUnit 5 and then merge it master. Any suggestion/comments are greatly appreciated. |
Now that Java 8 is required we can use JUnit 5. It brings some nice features such as
Assume
that allows a test to be skipped based on run-time conditions. There are some tests that are not run on Windows but currently they are reported as passed, withAssume
they will be properly reported as skipped.The text was updated successfully, but these errors were encountered: