| XWiki Platform still contains some JUnit 3 / JUnit 4 based test tools and assertions that are no longer needed now that the tests have been migrated to JUnit 5. Remove them, as a step towards removing JUnit 4 (and the JUnit Vintage engine) from the test classpath altogether:
- Remove MockitoOldcoreRule (oldcore test-jar), which is no longer used as a JUnit 4 rule anywhere (the only remaining references were to static constants declared on MockitoOldcore).
- Remove AbstractGuestTest (xwiki-platform-test-ui), which has no user anymore.
- Replace JUnit 3 / JUnit 4 assertions (junit.framework.TestCase, org.junit.Assert) with JUnit 5 ones in the remaining places that still use them (page objects, test utilities, unit tests).
- Remove stale references to JUnit 4 rules and to jmock.
Note: this doesn't cover the old non-Docker functional test frameworks (flavor-test-ui, -storage, -escaping, -webstandards, -misc, -security, -upgrade) which still require JUnit 4, and which need to be migrated separately. |