forked from connamara/agent_fix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scope.feature
138 lines (113 loc) · 5.89 KB
/
scope.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
Feature: A demonstration of scoping capabilities in agent_fix
Background:
Given my agents are logged on
Scenario: FIX42
When I send the following FIX message from agent "my_initiator":
"""
8=FIX.4.235=D11=hello21=155=IBM54=140=260=20090101-17:13:06.684
"""
Then I should receive a message on FIX of type "NewOrderSingle" with agent "my_acceptor"
When I send the following FIX messages from agent "my_acceptor":
"""
8=FIX.4.235=811=hello17=12337=abc39=A150=A151=020=06=014=021=155=IBM54=140=260=20090101-17:13:06.684
8=FIX.4.235=811=hello17=12337=abc39=0150=0151=020=06=014=021=155=IBM54=140=260=20090101-17:13:06.684
"""
Then I should receive 2 messages on FIX with agent "my_initiator"
And the 1st message should have the following:
| ClOrdID | "hello" |
| OrderID | "abc" |
| Symbol | "IBM" |
| OrdStatus | "PENDING_NEW" |
When I inspect the 2nd message
Then the FIX message should have the following:
| ClOrdID | "hello" |
| OrderID | "abc" |
| Symbol | "IBM" |
| OrdStatus | "NEW" |
When I send the following FIX messages from agent "my_acceptor":
"""
8=FIX.4.235=811=hello17=12337=abc39=4150=A151=020=06=014=021=155=IBM54=140=260=20090101-17:13:06.684
"""
Then I should receive a message over FIX with agent "my_initiator"
And the FIX message should have the following:
| ClOrdID | "hello" |
| OrderID | "abc" |
| Symbol | "IBM" |
| OrdStatus | "CANCELED" |
When I sleep 5 seconds
Then I should not receive any more messages with agent "my_initiator"
And I should not receive any more messages with agent "my_initiator"
@fix50
Scenario: FIX50/FIXT
When I send the following FIX message from agent "my_fix50_initiator":
"""
8=FIXT.1.135=D11=hello21=155=IBM54=140=260=20090101-17:13:06.684
"""
Then I should receive a message on FIX of type "NewOrderSingle" with agent "my_fix50_acceptor"
When I send the following FIX messages from agent "my_fix50_acceptor":
"""
8=FIXT.1.135=811=ahoyhoy17=12337=xyzzy39=A150=A151=06=014=021=155=AAPL54=140=260=20090101-17:13:06.684
8=FIXT.1.135=811=ahoyhoy17=12337=xyzzy39=0150=0151=06=014=021=155=AAPL54=140=260=20090101-17:13:06.684
"""
Then I should receive 2 messages on FIX with agent "my_fix50_initiator"
And the 1st message should have the following:
| ClOrdID | "ahoyhoy" |
| OrderID | "xyzzy" |
| Symbol | "AAPL" |
| OrdStatus | "PENDING_NEW" |
When I inspect the 2nd message
Then the FIX message should have the following:
| ClOrdID | "ahoyhoy" |
| OrderID | "xyzzy" |
| Symbol | "AAPL" |
| OrdStatus | "NEW" |
When I send the following FIX messages from agent "my_fix50_acceptor":
"""
8=FIXT.1.135=811=ahoyhoy17=12337=xyzzy39=4150=A151=06=014=021=155=AAPL54=140=260=20090101-17:13:06.684
"""
Then I should receive a message over FIX with agent "my_fix50_initiator"
And the FIX message should have the following:
| ClOrdID | "ahoyhoy" |
| OrderID | "xyzzy" |
| Symbol | "AAPL" |
| OrdStatus | "CANCELED" |
When I sleep 5 seconds
Then I should not receive any more messages with agent "my_fix50_initiator"
And I should not receive any more messages with agent "my_fix50_initiator"
Scenario: scope inclusion for app messages only (default)
When I send the following FIX message from agent "my_initiator":
"""
8=FIX.4.235=D11=hello21=155=IBM54=140=260=20090101-17:13:06.684
"""
Then I should receive a message on FIX of type "NewOrderSingle" with agent "my_acceptor"
When I send the following FIX messages from agent "my_acceptor":
"""
8=FIX.4.235=811=hello17=12337=abc39=A150=A151=020=06=014=021=155=IBM54=140=260=20090101-17:13:06.684
8=FIX.4.235=811=hello17=12337=abc39=0150=0151=020=06=014=021=155=IBM54=140=260=20090101-17:13:06.684
8=FIX.4.235=811=hello17=12337=abc39=4150=A151=020=06=014=021=155=IBM54=140=260=20090101-17:13:06.684
"""
Then I should receive 3 messages on FIX with agent "my_initiator"
And the FIX messages should include a message with the following:
| ClOrdID | "hello" |
| OrderID | "abc" |
| Symbol | "IBM" |
| OrdStatus | "NEW" |
@fix50
Scenario: scope inclusion for app messages only (default) (FIX50/FIXT)
When I send the following FIX message from agent "my_fix50_initiator":
"""
8=FIXT.1.135=D11=aloha21=155=GOOG54=140=260=20090101-17:13:06.684
"""
Then I should receive a message on FIX of type "NewOrderSingle" with agent "my_fix50_acceptor"
When I send the following FIX messages from agent "my_fix50_acceptor":
"""
8=FIXT.1.135=811=aloha17=12337=xyz39=A150=A151=06=014=021=155=GOOG54=140=260=20090101-17:13:06.684
8=FIXT.1.135=811=aloha17=12337=xyz39=0150=0151=06=014=021=155=GOOG54=140=260=20090101-17:13:06.684
8=FIXT.1.135=811=aloha17=12337=xyz39=4150=A151=06=014=021=155=GOOG54=140=260=20090101-17:13:06.684
"""
Then I should receive 3 messages on FIX with agent "my_fix50_initiator"
And the FIX messages should include a message with the following:
| ClOrdID | "aloha" |
| OrderID | "xyz" |
| Symbol | "GOOG" |
| OrdStatus | "NEW" |