<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guess-market/ui-desktop/src/test/java/market/guess/ui, branch 4.0</title>
<subtitle>definitely not polymarket
</subtitle>
<id>https://git.sartin.in/guess-market/atom?h=4.0</id>
<link rel='self' href='https://git.sartin.in/guess-market/atom?h=4.0'/>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/'/>
<updated>2026-10-11T16:28:30Z</updated>
<entry>
<title>ui-fx: move the JavaFX UI into a module that sees only the api</title>
<updated>2026-10-11T16:28:30Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-10-11T16:28:04Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=3a734b84705ccb8174e9cf24b74d7a3c3b2c1beb'/>
<id>urn:sha1:3a734b84705ccb8174e9cf24b74d7a3c3b2c1beb</id>
<content type='text'>

Exercise 3 asks for a new desktop client that reuses the Exercise 2
screens, and the course asks that clients depend on the DTO contract,
never on the engine. ui-desktop mixed both: its views and controllers
only talk to the api interfaces, but AppView and AppState each had a
convenience constructor that built a ServiceEngine, which tied every UI
class to the service module.

Move the screens, controllers, components, FXML, skins and fonts into
a new ui-fx module that depends on api alone. Packages are unchanged,
so FXML controller names and resource paths keep working as they are.
ui-desktop keeps only the Exercise 2 app: Launcher, App, which now
builds the ServiceEngine and passes its contexts in, and ServiceEngine
itself. The Exercise 3 client can then reuse ui-fx with remote
contexts and never put the engine on its classpath. The build proves
the split: ui-fx compiles with nothing but api visible.

Tests move with the code they cover. AppStateTest drives the real
engine, so it stays in ui-desktop.


</content>
</entry>
<entry>
<title>tests: cover the ex-2 loader, order book trading and desktop state</title>
<updated>2026-09-10T08:55:50Z</updated>
<author>
<name>Kostya</name>
<email>mail@sartin.in</email>
</author>
<published>2026-09-10T08:55:50Z</published>
<link rel='alternate' type='text/html' href='https://git.sartin.in/guess-market/commit/?id=1a8b75f96f0c6855581be3a38069f09eca37d1f5'/>
<id>urn:sha1:1a8b75f96f0c6855581be3a38069f09eca37d1f5</id>
<content type='text'>
Add tests for the behaviour introduced in the last few commits, so
later changes to matching, settlement or the UI state can't quietly
break it.

On the service side, Ex2LoaderTest loads the ex-2 fixtures and checks
that every invalid file is rejected for its own reason, including
events with no market maker or two of them, and v1 files. The order
book tests cover buys and sells that match or rest in the ladder,
self-trade prevention, cash and shares reserved by resting orders,
price bounds, risk rejections, and resolution cancelling resting
orders and paying the holders. A simulation checks that LMSR
settlement conserves money.

LedgerMapperTest used to pin the unmapped seq and at fields to their
defaults. Now that the mapper fills them from the entry id and time,
assert the real values and add a case for a null time.

On the desktop side, AppStateTest drives the real ServiceEngine through
loading, event creation, LMSR and order book trading, and checks that
the observable state updates. Smaller tests check chart timestamps,
money and probability formatting, and that every animation settles on
its final frame, which is what the UI shows when animations are off.
</content>
</entry>
</feed>
