[YANGTOOLS-1521] Migrate to JUnit5 Created: 04/Jul/23 Updated: 18/Oct/23 Resolved: 18/Oct/23 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 12.0.0 |
| Type: | Task | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The following artifacts contain references to JUnit4: codec/yang-data-codec-binfmt codec/yang-data-codec-gson codec/yang-data-codec-xml common/util data/yang-data-impl data/yang-data-tree-ri data/yang-data-tree-spi parser/odlext-parser-support parser/rfc6241-parser-support parser/rfc6536-parser-support parser/rfc6643-parser-support parser/rfc7952-parser-support parser/rfc8040-parser-support parser/rfc8528-parser-support parser/rfc8639-parser-support parser/yang-parser-impl parser/yang-parser-spi plugin/yang-maven-plugin-it yang/yang-repo-spi Migrate them to JUnit5. This includes cleaning up things like assertThat(instanceOf()), assertTrue(foo instanceof x) to use assertInstanceOf(), etc. |
| Comments |
| Comment by Matúš Matok [ 11/Jul/23 ] |
|
This is the plugin setup I was using for the refactoring, letting it live here for future references. <build>
I did not use org.openrewrite.java.testing.junit5.JUnit5BestPracticesRecipe nor JUnit4to5Migration as it produced an invalid code with a ton of checkstyle errors. |
| Comment by Matúš Matok [ 30/Aug/23 ] |
|
In case anyone will continue with this, the aforementioned recipes have not been merged yet, so here is the pull request containing them: |