Skip to content

Instantly share code, notes, and snippets.

@prystupa
Last active November 26, 2017 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save prystupa/4374058 to your computer and use it in GitHub Desktop.
Save prystupa/4374058 to your computer and use it in GitHub Desktop.
OrderBook tests for decreasing top outstanding order
Scenario Outline: Decrease top outstanding order partially and then fill it completely
When the following orders are added to the "<Side>" book:
| Broker | Qty | Price |
| A | 100 | 10.5 |
| B | 100 | 10.5 |
Then the "<Side>" order book looks like:
| Broker | Qty | Price |
| A | 100 | 10.5 |
| B | 100 | 10.5 |
When the top order of the "<Side>" book is filled by "20"
Then the "<Side>" order book looks like:
| Broker | Qty | Price |
| A | 80 | 10.5 |
| B | 100 | 10.5 |
When the top order of the "<Side>" book is filled by "80"
Then the "<Side>" order book looks like:
| Broker | Qty | Price |
| B | 100 | 10.5 |
Examples:
| Side |
| Buy |
| Sell |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment