diff options
| author | Kostya <mail@sartin.in> | 2026-08-14 18:49:26 +0000 |
|---|---|---|
| committer | Kostya <mail@sartin.in> | 2026-08-14 18:49:26 +0000 |
| commit | 12611a5f0116351ab9114f5403222aead7a8329f (patch) | |
| tree | f403cb522e4ea63ac2e919d7e72d6afa83eea878 /test-data/ex-1 | |
| parent | ec716e23ea8d827d4401ced8f34d533e30209d55 (diff) | |
| download | guess-market-12611a5f0116351ab9114f5403222aead7a8329f.tar.gz guess-market-12611a5f0116351ab9114f5403222aead7a8329f.tar.xz guess-market-12611a5f0116351ab9114f5403222aead7a8329f.zip | |
Implement in-memory repositories, XML load validation, and menu exit/list 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
Diffstat (limited to 'test-data/ex-1')
| -rw-r--r-- | test-data/ex-1/multiple.xml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test-data/ex-1/multiple.xml b/test-data/ex-1/multiple.xml new file mode 100644 index 0000000..3f2432d --- /dev/null +++ b/test-data/ex-1/multiple.xml | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <Guess-Market xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="GM-EX1-schema.xsd"> | ||
| 3 | <GM-events> | ||
| 4 | <GM-event name="Mujtaba is Dead"> | ||
| 5 | <id>1</id> | ||
| 6 | <description>This event gambles if Mujtaba is a live or not. it will be determined if he will be shown in public until 31.8.26</description> | ||
| 7 | <comision type="on-purchase">5</comision> | ||
| 8 | <GM-options> | ||
| 9 | <GM-option>Hell Yea !</GM-option> | ||
| 10 | <GM-option>No way !</GM-option> | ||
| 11 | </GM-options> | ||
| 12 | <GM-method> | ||
| 13 | <GM-LMSR> | ||
| 14 | <b>100</b> | ||
| 15 | </GM-LMSR> | ||
| 16 | </GM-method> | ||
| 17 | </GM-event> | ||
| 18 | <GM-event name="World Cap Winner"> | ||
| 19 | <id>2</id> | ||
| 20 | <description>Who do you think will win the world cap ?</description> | ||
| 21 | <comision type="on-close">15</comision> | ||
| 22 | <GM-options> | ||
| 23 | <GM-option>Argentina</GM-option> | ||
| 24 | <GM-option>Spain</GM-option> | ||
| 25 | </GM-options> | ||
| 26 | <GM-method> | ||
| 27 | <GM-LMSR> | ||
| 28 | <b>50</b> | ||
| 29 | </GM-LMSR> | ||
| 30 | </GM-method> | ||
| 31 | </GM-event> | ||
| 32 | <GM-event name="Earth Quake on Dead Sea"> | ||
| 33 | <id>3</id> | ||
| 34 | <description>Will there be an earth quake on the dead sea until the December 31th 2026</description> | ||
| 35 | <comision type="on-purchase">50</comision> | ||
| 36 | <GM-options> | ||
| 37 | <GM-option>Yes</GM-option> | ||
| 38 | <GM-option>No</GM-option> | ||
| 39 | </GM-options> | ||
| 40 | <GM-method> | ||
| 41 | <GM-LMSR> | ||
| 42 | <b>400</b> | ||
| 43 | </GM-LMSR> | ||
| 44 | </GM-method> | ||
| 45 | </GM-event> | ||
| 46 | </GM-events> | ||
| 47 | </Guess-Market> | ||