If we decide this is worth doing, we will have to take the following things into account.
- We should prefer JUnit Jupiter API's
assertThrows over the try..fail..catch idiom
- We might want to use
assertAll over just writing assertions one line after another, so that all potential assertion errors can be gathered and thrown together as one exception for easier debugging.
- We'll have to use
assertTimeout or assertTimeoutPreemptively where we would have used @Test(timeout=...) or @Rule public Timeout timeout = ...
- We should consider using
assertIterableEquals and assertLinesMatch where normal collection equality assertions are insufficient.
- And finally, if we use any custom
@Rules or @Runners, we will need to find alternative extensions for JUnit Jupiter/5.
If we decide this is worth doing, we will have to take the following things into account.
assertThrowsover thetry..fail..catchidiomassertAllover just writing assertions one line after another, so that all potential assertion errors can be gathered and thrown together as one exception for easier debugging.assertTimeoutorassertTimeoutPreemptivelywhere we would have used@Test(timeout=...)or@Rule public Timeout timeout = ...assertIterableEqualsandassertLinesMatchwhere normal collection equality assertions are insufficient.@Rules or@Runners, we will need to find alternative extensions for JUnit Jupiter/5.