diff options
| author | Kostya <mail@sartin.in> | 2026-09-06 10:36:54 +0300 |
|---|---|---|
| committer | Kostya <mail@sartin.in> | 2026-09-06 10:36:54 +0300 |
| commit | 508898f52c16cc737bc7d08b8ee4c29fab8d1146 (patch) | |
| tree | ea2516796c7dc959a0009e70569e0d2d2b718c1f /tools | |
| parent | da82f3b492c3cd36f2e8723632a63a6cc1f4e39b (diff) | |
| download | guess-market-508898f52c16cc737bc7d08b8ee4c29fab8d1146.tar.gz guess-market-508898f52c16cc737bc7d08b8ee4c29fab8d1146.tar.xz guess-market-508898f52c16cc737bc7d08b8ee4c29fab8d1146.zip | |
ex-2: add invalid-input fixtures and wire ui-desktop to the service
The ex-2 loader has to reject documents that are schema-valid but
logically broken, and so far only error-2.xml and error-3.xml exercised
that path. Add one fixture per validation rule under
test-data/ex-2/invalid, each a copy of small.xml with a single defect
described in a leading comment: a non-.xml extension, a duplicate event
id, commission outside 0..90 on either side, a duplicate user name,
zero or negative initial cash, a market maker referencing an unknown
event, and an event with no market maker or with two.
Teach LedgerMapper to map individual LedgerEntry records to
LedgerEntryDTO, renaming id to seq and time to at and rendering the
timestamp through InstantOptions.humanize, so callers can show a ledger
history rather than only the account summary.
Make ui-desktop depend on api and service in the build tooling and in
its Eclipse classpath, since the desktop UI now talks to the service
layer directly, and put lib/openjfx on java.library.path for the test
run so tests touching JavaFX can load its native libraries.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/_util.sh | 2 | ||||
| -rw-r--r-- | tools/test.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/_util.sh b/tools/_util.sh index a041f2d..d6e8db5 100644 --- a/tools/_util.sh +++ b/tools/_util.sh | |||
| @@ -10,7 +10,7 @@ MODULES="api service ui-console ui-desktop" | |||
| 10 | DEPS_api="" | 10 | DEPS_api="" |
| 11 | DEPS_service="api" | 11 | DEPS_service="api" |
| 12 | DEPS_ui_console="api service" | 12 | DEPS_ui_console="api service" |
| 13 | DEPS_ui_desktop="" | 13 | DEPS_ui_desktop="api service" |
| 14 | 14 | ||
| 15 | RUNTIME_LIB_DIRS="pico jaxb gson openjfx" | 15 | RUNTIME_LIB_DIRS="pico jaxb gson openjfx" |
| 16 | 16 | ||
diff --git a/tools/test.sh b/tools/test.sh index e867871..41602f4 100644 --- a/tools/test.sh +++ b/tools/test.sh | |||
| @@ -49,7 +49,7 @@ mkdir -p build/coverage | |||
| 49 | [ -n "$AGENT_ARG" ] && AGENT_ARG="$AGENT_ARG " | 49 | [ -n "$AGENT_ARG" ] && AGENT_ARG="$AGENT_ARG " |
| 50 | AGENT_ARG="$AGENT_ARG-javaagent:$JACOCO_AGENT=destfile=build/coverage/jacoco.exec" | 50 | AGENT_ARG="$AGENT_ARG-javaagent:$JACOCO_AGENT=destfile=build/coverage/jacoco.exec" |
| 51 | 51 | ||
| 52 | java $AGENT_ARG -jar "$JUNIT_JAR" execute \ | 52 | java -Djava.library.path=lib/openjfx $AGENT_ARG -jar "$JUNIT_JAR" execute \ |
| 53 | --class-path "$TEST_CP" --scan-class-path --details=summary | 53 | --class-path "$TEST_CP" --scan-class-path --details=summary |
| 54 | 54 | ||
| 55 | echo "=== Generating coverage report ===" | 55 | echo "=== Generating coverage report ===" |