Created
January 12, 2013 16:47
-
-
Save prystupa/4519167 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Core Pegged Order Functionality | |
Scenario Outline: Adding pegged order to a book with no best limit to peg | |
If a book is empty than no best limit is available to peg, so we expect the order to be rejected | |
If a book only has market orders then best limit is also undefined, so we also expect the order to be rejected | |
Given the "<Side>" order book looks like: | |
| Broker | Qty | Price | | |
When the following orders are added to the "<Side>" book: | |
| Broker | Qty | Price | | |
| A | 100 | Peg | | |
Then the following "<Side>" orders are rejected: | |
| Broker | Qty | Price | | |
| A | 100 | Peg | | |
And the "<Side>" order book looks like: | |
| Broker | Qty | Price | | |
When the following orders are added to the "<Side>" book: | |
| Broker | Qty | Price | | |
| B | 100 | MO | | |
| C | 100 | Peg | | |
Then the following "<Side>" orders are rejected: | |
| Broker | Qty | Price | | |
| C | 100 | Peg | | |
And the "<Side>" order book looks like: | |
| Broker | Qty | Price | | |
| B | 100 | MO | | |
Examples: | |
| Side | | |
| Buy | | |
| Sell | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment