Upgrade from JUnit 4 to JUnit 5
We are still using JUnit 4, while JUnit 5 has been available for a long time, and has many nice features that we could benefit from, such as: * `assertThrows` in the test method, rather than as an annotation, allowing to test multiple throws in a single test. * Nice functionality for parameterized tests. This will require: * Project metadata changes (manifests, `.classpath`, etc). * Imports to `org.junit.jupiter.*` instead of `org.unit.*`. * Some changes to our Maven build configuration (surefire). * Carefully inspecting all assertion statements, due to backward incompatible API changes, such as: * `org.junit.Assert`: `public static void assertEquals(String message, Object expected, Object actual)` * `org.junit.jupiter.api.Assertions`: `public static void assertEquals(Object expected, Object actual, String message)` * If you do use `assertEquals` on 3 `String`-typed arguments, that will still compile with the new import, but will actually mix the arguments. * ... We do the upgrade in two steps: * [x] Upgrade JUnit tests (See !601) * [x] Upgrade JUnit Plug-in tests and `setext.texteditor` test, we might need Tycho 4.0 for this (see https://gitlab.eclipse.org/eclipse/escet/escet/-/merge_requests/601#note_1147222).
issue

Copyright © Eclipse Foundation AISBL. All rights reserved.     Privacy Policy | Terms of Use | Copyright Agent