devmode test: load the exe outside assertThrows so it skips cleanly without game files (ci)

This commit is contained in:
MineTec committed 2026-11-08 18:36:59 +01:00
1 parent 165134c0d8
commit 87a1998dd4
1 file changed
+6 -2
@@ -123,8 +123,12 @@ class DevModeModTest {
}
@Test
void sameKeyTwiceIsRejected() {
assertThrows(IllegalArgumentException.class, () -> applied("de", Map.of("idolKey", "F1"), tmp));
void sameKeyTwiceIsRejected() throws Exception {
ExeImage img = exe("de"); // outside assertThrows: skips the test when the exe is not available
img.setOwner("devmode");
DevModeMod mod = new DevModeMod();
TestModContext ctx = new TestModContext(tmp, mod, Map.of("idolKey", "F1"), img);
assertThrows(IllegalArgumentException.class, () -> mod.apply(ctx));
}
@Test