strman-java
strman-java copied to clipboard
Upgrade unit tests from JUnit 4 to JUnit 5
- Use dynamic tests
- Use Assertions.class
- Use Nestedclasses and display names
- JUnit 5 Parameterized tests
- Create separate test classes per functionality
Limitations of using JUnit5 with current version of Gradle (4.7) According to this link from JUnit5 user guide:
The results of any tests run via the JUnit Gradle plugin will not be included in the standard test report generated by Gradle.
Also, there are other limitations mentioned here in Gradle 4.7 user guide:
There’re some known limitations on JUnit 5, e.g. tests in static nested classes won’t be discovered and classes are still displayed by its name instead of
@DisplayName
. They’ll be fixed in future version of Gradle.