fix: wire PlatformDetector in ExecutableDetectorTest
Build & Deploy / build-and-deploy (push) Successful in 38s

ExecutableDetector uses @Inject for PlatformDetector, but tests
instantiate it directly via 'new' — CDI doesn't run. Manually set
the package-private 'platform' field in an instance initializer.
This commit is contained in:
David Alvarez
2026-06-09 14:04:49 +02:00
parent c3a332d600
commit f69f3fa30a
@@ -14,8 +14,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
class ExecutableDetectorTest {
private final PlatformDetector platform = new PlatformDetector();
private final ExecutableDetector detector = new ExecutableDetector();
// Manually wire dependencies since we're not in a CDI container
{
detector.platform = platform;
}
@Test
void findAll_findsExeComBat(@TempDir Path dir) throws Exception {
Files.writeString(dir.resolve("GAME.EXE"), "MZ");