Package and qualify standalone macOS designer with bundled runtime

This commit is contained in:
2026-11-13 22:06:35 +01:00
parent 9ab1a4f530
commit e865d7b4df
10 changed files with 600 additions and 10 deletions
@@ -0,0 +1,37 @@
package de.neitzel.fxdesigner.standalone;
import static org.junit.jupiter.api.Assertions.*;
import java.util.List;
import org.junit.jupiter.api.Test;
class StandaloneOptionsTest {
@Test
void supportsProjectArgumentsAndOptionalDocument() {
var options =
StandaloneOptions.parse(
List.of("--configuration", "project/config.json", "--settings", "local.json"));
assertNull(options.document());
assertTrue(options.configuration().isAbsolute());
assertEquals(
"sample",
StandaloneOptions.parse(List.of("--launch", "host.properties", "sample"))
.document()
.toString());
assertNotNull(StandaloneOptions.parse(List.of("host.properties", "View.fxml")).legacy());
}
@Test
void rejectsAmbiguousAndIncompleteArguments() {
for (var args :
List.of(
List.<String>of(),
List.of("--bad"),
List.of("--launch"),
List.of("--launch", "a", "--context", "b"),
List.of("--launch", "a", "--launch", "b"),
List.of("--configuration", "a"),
List.of("--launch", "a", "one", "two")))
assertThrows(IllegalArgumentException.class, () -> StandaloneOptions.parse(args));
}
}