| 1 | | Well, I've got it mostly working. There is one test that just doesn't seem to like JUnit5 though (MinimapDialogTest.java, see [https://gitlab.com/smocktaylor/josm/-/commit/86565c689dacd523e18891a95e5ac8647b0b3496 86565c689dacd523e18891a95e5ac8647b0b3496] for Assert -> Assertions changes -- the test is still run under JUnit4, as there are issues running it under JUnit5). |
| 2 | | |
| 3 | | I'll work on getting some other annotations pushed so I can try it with only JUnit annotations |
| 4 | | |
| 5 | | Current annotations in my working directory (relevant for MinimapDialogTest): |
| 6 | | * @Main |
| 7 | | * Needs @HTTP (otherwise MOTD throws -- "HTTP factory has not been set") |
| 8 | | * @Projection |
| 9 | | * @FakeImagery |
| 10 | | * Needs a @Wiremock rule, which I haven't written yet, probably why it fails under JUnit5 in the first place |
| | 1 | ell, it looks like it failed (Java 11): |
| | 2 | {{{ |
| | 3 | java.lang.NoSuchFieldException: classes |
| | 4 | at java.base/java.lang.Class.getDeclaredField(Class.java:2549) |
| | 5 | at org.openstreetmap.josm.testutils.annotations.BasicPreferences$BasicPreferencesExtension.resetConfigVariables(BasicPreferences.java:92) |
| | 6 | at org.openstreetmap.josm.testutils.annotations.BasicPreferences$BasicPreferencesExtension.beforeAll(BasicPreferences.java:76) |
| | 7 | at org.openstreetmap.josm.testutils.annotations.BasicPreferences$BasicPreferencesExtension.beforeEach(BasicPreferences.java:82) |
| | 8 | }}} |
| | 9 | Specific code: `final Field classField = ClassLoader.class.getDeclaredField("classes");`. I'm not certain why this is failing -- Java 11 appears to have that field in ClassLoader.java. |