| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Split GuessMarketContext into a separate CatalogContext for read-only
event listing, wrap fallible operations in Result<T> instead of throwing,
and wire load/save of events and users through a JSON Wrapper.
|
| |
|
|
|
|
|
|
|
|
|
| |
new menu commands
Fill in the previously stubbed cost/pricing math for both trading
mechanisms, and give OrderBookTradingMechanism an actual matching engine
with resting bid/ask books. Fold EventRepository/UserRepository access
into a single MarketContext used by LocalGuessMarketContext, and move the
repository package under infrastructure. Add Buy/EventDetails/LoadState/
SaveState/SettleEvent console commands and wire them into App/Menu.
|
| |
|
|
|
|
|
|
|
| |
TradingMechanism's q/quantity params move from long/long[] to int/int[]
to match the rest of the domain (Trade.quantity, Option counts, etc.
are already int).
Add InputProcessor.readYesNo and readSelect for upcoming menu commands
that need a confirm prompt or a pick-from-list prompt.
|
| |
|
|
|
|
|
|
|
|
|
| |
InputProvider/OutputProvider each had one implementation and no test
exercised the seam, so fold Console{Input,Output}Provider straight into
InputProcessor and update Menu/MenuCommand call sites accordingly.
Account and Event both use AtomicInteger for a ledger/trade id counter
that's only ever touched next to a plain, non-thread-safe ArrayList add
in the same method - the atomic bought no real thread-safety. Swapped
both to plain int with ++.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
commands
- Add generic Repository<T> interface; EventRepository/UserRepository extend it
- Implement InMemoryEventRepository/InMemoryUserRepository backed by ArrayList
- Rename XMLLoader to XMLLoaderV1, add LoadValidator and mapper/v2 package
- Add OrderBookTradingMechanism
- Add User(String, int) convenience constructor
- Add ListEventsMenuCommand and ExitMenuCommand, isExit() on MenuCommand
- Menu now sizes selection range by max command index and exits on isExit()
- LoadFileMenuCommand reports validation issues on failed loads
- Untrack test-data/ and config.properties from .gitignore
|
| |
|
|
|
| |
Correct Mapper's generic parameter order to <TModel, TDomain> and stub
addEvent/addUser on the Event/User repositories.
|
| |
|
|
|
|
|
| |
and file load command
Wires InputProcessor into the console menu's selection loop and the
load-file command's prompt handling, replacing the unimplemented stub.
|
| |
|
|
|
|
|
|
| |
Implement LocalGuessMarketContext.buyShares/loadEvents via a new
TradingOperation and Loader, backed by in-memory repositories. Replace
the ConsoleInputProviderFactory/ConsoleOutputProviderFactory pattern
with picocontainer-injected providers, and drive the menu from a list
of MenuCommand implementations instead of a hardcoded printout.
|
| |
|
|
|
|
|
| |
and tests
Removes the placeholder Mapper interface in favor of concrete mapper/provider
implementations, fixes Menu.stop() to no-op instead of throwing.
|
| |
|
|
|
|
|
|
| |
InputProvider/OutputProvider were api-layer types only ever implemented
by the console UI; relocate them there. Drop the unused
GuessMarketEngine/LocalGuessMarketService pair, flesh out LoadResultDTO
with success/failure variants, and make LocalGuessMarketContext.LoadAsync
report real outcomes instead of an empty placeholder.
|
| |
|
|
|
|
|
|
|
|
|
| |
PicoContainer wiring
Relocates GuessMarketEngine/GuessMarketContext into market.guess.api so
engine and ui-console depend on a shared contract instead of engine
internals, and makes context loading async (CompletableFuture). Adds
InputProvider/OutputProvider interfaces with console implementations,
wires the console app's Menu through a PicoContainer, and adds the
generated model classes plus vendored picocontainer jar needed to build it.
|
|
|
Move api, engine, ui-console and ui-desktop out of modules/ up to the
repo root and drop the empty exception project (GuessMarketException now
lives in api).
Vendor gson, jaxb, okhttp, openjfx and tomcat under lib/, and group the
JUnit standalone jar into lib/junit/ alongside them.
Rewrite every .classpath: drop the copy-pasted optional="true" that was
masking real build path errors, point the library entries at ../lib/,
and put the JUnit jar on the test source folders so the placeholder
AppTest classes compile.
ui-desktop: take the JavaFX jars off the modulepath (there is no
module-info.java, so module="true" left the packages unresolvable) and
add a Launcher that calls Application.launch, avoiding the "JavaFX
runtime components are missing" check without VM arguments.
engine: add LocalGuessMarketService and the GuessMarketContext provider
interface, and give GuessMarketException the no-arg and cause
constructors they need.
|