fix_spec 0.2.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +1 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/README.md +28 -1
- data/VERSION +1 -1
- data/features/builder.feature +164 -5
- data/features/equivalence_data_dictionary.feature +49 -1
- data/features/message_type.feature +11 -0
- data/features/nested_builder.feature +229 -2
- data/features/support/FIX50SP1.xml +9419 -0
- data/features/support/FIXT11.xml +383 -0
- data/features/support/env.rb +8 -0
- data/fix_spec.gemspec +10 -7
- data/lib/fix_spec/builder.rb +89 -27
- data/lib/fix_spec/configuration.rb +19 -2
- data/lib/fix_spec/cucumber.rb +1 -2
- data/spec/fix_spec/data_dictionary_spec.rb +12 -6
- metadata +32 -49
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: abf2ce70d94be701fd2f48bf20206908599bb073
|
4
|
+
data.tar.gz: fe9acf913c8fa3384118f6df8011b3eee3ea933b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8c21f55b98b3e1dcbfa5356e2ccba30711b3d15f5f19eb4732bce5652f8744008ff231f6ca82f45b9be1339985fc43a482465c7e53045d3c2a0f97d4af4f05e5
|
7
|
+
data.tar.gz: e817c489114ed90ab739aee03f0d2fe787af014e734d0790d3552d553e7c6edaa63e84d1845d1eb5d66b6b93c2db2e9f712166678eeb04c0dadad6415c56d82f
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -54,7 +54,7 @@ GEM
|
|
54
54
|
multi_json (~> 1.0)
|
55
55
|
multi_xml (~> 0.5)
|
56
56
|
rack (~> 1.2)
|
57
|
-
quickfix-jruby (1.
|
57
|
+
quickfix-jruby (1.6.0-java)
|
58
58
|
rack (1.5.2)
|
59
59
|
rake (10.1.0)
|
60
60
|
rdoc (4.0.1)
|
@@ -76,6 +76,6 @@ DEPENDENCIES
|
|
76
76
|
cuke_mem (~> 0.1.1)
|
77
77
|
jeweler (~> 1.8)
|
78
78
|
json_spec (~> 1.1.1)
|
79
|
-
quickfix-jruby (~> 1.
|
79
|
+
quickfix-jruby (~> 1.6.0)
|
80
80
|
rake (~> 10.1)
|
81
81
|
rspec (~> 2.14)
|
data/README.md
CHANGED
@@ -103,6 +103,31 @@ And I set the FIX message at "OrderQty" to 123
|
|
103
103
|
Then I send the message
|
104
104
|
```
|
105
105
|
|
106
|
+
Or it can be simplified using a table:
|
107
|
+
|
108
|
+
```cucumber
|
109
|
+
Given I create the following FIX.4.2 message of type "NewOrderSingle":
|
110
|
+
| SenderCompID | "MY_SENDER" |
|
111
|
+
| TargetCompID | "MY_TARGET" |
|
112
|
+
| OrdType | "MARKET" |
|
113
|
+
| OrderQty | 123 |
|
114
|
+
```
|
115
|
+
|
116
|
+
You can even do repeating groups:
|
117
|
+
|
118
|
+
```cucumber
|
119
|
+
Given I create the following FIX.4.2 message of type "NewOrderList":
|
120
|
+
| ListID | "List_ID" |
|
121
|
+
And I add the following "NoOrders" group:
|
122
|
+
| Symbol | "ABC" |
|
123
|
+
| Side | "BUY" |
|
124
|
+
| OrderQty | 123 |
|
125
|
+
And I add the following "NoOrders" group:
|
126
|
+
| Symbol | "ABC" |
|
127
|
+
| Side | "SELL" |
|
128
|
+
| OrderQty | 123 |
|
129
|
+
```
|
130
|
+
|
106
131
|
The built FIX message can be accessed through the `message` function in the ```FIXSpec::Builder``` module.
|
107
132
|
|
108
133
|
### Configuration
|
@@ -161,9 +186,11 @@ Credits
|
|
161
186
|
|
162
187
|
Contributers:
|
163
188
|
|
164
|
-
* Chris Busbey
|
189
|
+
* [Chris Busbey](https://github.com/cbusbey)
|
165
190
|
* Matt Lane
|
166
191
|
* Ben Gura
|
192
|
+
* Brad Haan
|
193
|
+
* [Mike Gatny](https://github.com/mgatny)
|
167
194
|
|
168
195
|
![Connamara Systems](http://www.connamara.com/images/home-connamara-logo-lg.png)
|
169
196
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/features/builder.feature
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Feature: Building Fix Messages
|
3
3
|
|
4
4
|
@ignore_length_and_checksum
|
5
|
-
Scenario: Building via raw fix
|
5
|
+
Scenario: Building via raw fix (prior to FIXT/FIX50)
|
6
6
|
Given the following unvalidated fix message:
|
7
7
|
"""
|
8
8
|
8=FIX.4.235=849=ITG56=SILO205=4315=86=100.25410=50.25424=23.45411=Y43=N40=15=N
|
@@ -28,7 +28,37 @@ Then the FIX message should be:
|
|
28
28
|
}
|
29
29
|
"""
|
30
30
|
|
31
|
-
|
31
|
+
|
32
|
+
@ignore_length_and_checksum @fix50
|
33
|
+
Scenario: Building via raw fix (using FIXT/FIX50)
|
34
|
+
Given the following unvalidated fix message:
|
35
|
+
"""
|
36
|
+
8=FIXT.1.135=81128=849=ITG56=SILO541=20130426315=86=100.25410=50.25424=23.45411=Y43=N40=15=N
|
37
|
+
"""
|
38
|
+
When I get the fix message
|
39
|
+
|
40
|
+
Then the FIX message should be:
|
41
|
+
"""
|
42
|
+
{
|
43
|
+
"BeginString":"FIXT.1.1",
|
44
|
+
"MsgType":"ExecutionReport",
|
45
|
+
"ApplVerID":"FIX50SP1",
|
46
|
+
"SenderCompID":"ITG",
|
47
|
+
"TargetCompID":"SILO",
|
48
|
+
"MaturityDate":"20130426",
|
49
|
+
"DayOrderQty": 23.45,
|
50
|
+
"ExchangeForPhysical": true,
|
51
|
+
"AvgPx": 100.25,
|
52
|
+
"OrdType": "MARKET",
|
53
|
+
"PossDupFlag": false,
|
54
|
+
"AdvTransType": "NEW",
|
55
|
+
"UnderlyingPutOrCall": 8,
|
56
|
+
"WtAverageLiquidity":"50.25"
|
57
|
+
}
|
58
|
+
"""
|
59
|
+
|
60
|
+
|
61
|
+
Scenario: Building from scratch (prior to FIXT/FIX50)
|
32
62
|
|
33
63
|
Given I create a fix message
|
34
64
|
And I set the FIX message at "BeginString" to "FIX.4.2"
|
@@ -59,7 +89,41 @@ Then the fix message should be:
|
|
59
89
|
}
|
60
90
|
"""
|
61
91
|
|
62
|
-
|
92
|
+
@fix50
|
93
|
+
Scenario: Building from scratch (using FIXT/FIX50)
|
94
|
+
|
95
|
+
Given I create a fix message
|
96
|
+
And I set the FIX message at "BeginString" to "FIXT.1.1"
|
97
|
+
And I set the FIX message at "MsgType" to "ExecutionReport"
|
98
|
+
And I set the FIX message at "ApplVerID" to "FIX50SP1"
|
99
|
+
And I set the FIX message at "SenderCompID" to "ITG"
|
100
|
+
And I set the FIX message at "TargetCompID" to "SILO"
|
101
|
+
And I set the FIX message at "MaturityDate" to "20110635"
|
102
|
+
And I set the FIX message at "DayOrderQty" to 23.45
|
103
|
+
And I set the FIX message at "ExchangeForPhysical" to true
|
104
|
+
And I set the FIX message at "AvgPx" to 100.25
|
105
|
+
And I set the FIX message at "OrdType" to "MARKET"
|
106
|
+
And I set the FIX message at "PossDupFlag" to false
|
107
|
+
|
108
|
+
When I get the fix message
|
109
|
+
Then the fix message should be:
|
110
|
+
"""
|
111
|
+
{
|
112
|
+
"BeginString":"FIXT.1.1",
|
113
|
+
"MsgType":"ExecutionReport",
|
114
|
+
"ApplVerID":"FIX50SP1",
|
115
|
+
"SenderCompID":"ITG",
|
116
|
+
"TargetCompID":"SILO",
|
117
|
+
"MaturityDate":"20110635",
|
118
|
+
"DayOrderQty": 23.45,
|
119
|
+
"ExchangeForPhysical": true,
|
120
|
+
"AvgPx": 100.25,
|
121
|
+
"OrdType": "MARKET",
|
122
|
+
"PossDupFlag": false
|
123
|
+
}
|
124
|
+
"""
|
125
|
+
|
126
|
+
Scenario: Building a message of some type (prior to FIXT/FIX50)
|
63
127
|
Given I create a fix message of type "ExecutionReport"
|
64
128
|
And I set the FIX message at "BeginString" to "FIX.4.2"
|
65
129
|
And I set the FIX message at "SenderCompID" to "ITG"
|
@@ -88,8 +152,39 @@ Then the fix message should be:
|
|
88
152
|
}
|
89
153
|
"""
|
90
154
|
|
155
|
+
@fix50
|
156
|
+
Scenario: Building a message of some type (using to FIXT/FIX50)
|
157
|
+
Given I create a fix message of type "ExecutionReport"
|
158
|
+
And I set the FIX message at "BeginString" to "FIXT.1.1"
|
159
|
+
And I set the FIX message at "ApplVerID" to "FIX50SP1"
|
160
|
+
And I set the FIX message at "SenderCompID" to "ITG"
|
161
|
+
And I set the FIX message at "TargetCompID" to "SILO"
|
162
|
+
And I set the FIX message at "MaturityDate" to "19590522"
|
163
|
+
And I set the FIX message at "DayOrderQty" to 23.45
|
164
|
+
And I set the FIX message at "ExchangeForPhysical" to true
|
165
|
+
And I set the FIX message at "AvgPx" to 100.25
|
166
|
+
And I set the FIX message at "OrdType" to "MARKET"
|
167
|
+
And I set the FIX message at "PossDupFlag" to false
|
168
|
+
|
169
|
+
When I get the fix message
|
170
|
+
Then the fix message should be:
|
171
|
+
"""
|
172
|
+
{
|
173
|
+
"BeginString":"FIXT.1.1",
|
174
|
+
"MsgType":"ExecutionReport",
|
175
|
+
"ApplVerID":"FIX50SP1",
|
176
|
+
"SenderCompID":"ITG",
|
177
|
+
"TargetCompID":"SILO",
|
178
|
+
"MaturityDate":"19590522",
|
179
|
+
"DayOrderQty": 23.45,
|
180
|
+
"ExchangeForPhysical": true,
|
181
|
+
"AvgPx": 100.25,
|
182
|
+
"OrdType": "MARKET",
|
183
|
+
"PossDupFlag": false
|
184
|
+
}
|
185
|
+
"""
|
91
186
|
|
92
|
-
Scenario: Building a message of some type and version
|
187
|
+
Scenario: Building a message of some type and version (prior to FIXT/FIX50)
|
93
188
|
|
94
189
|
Given I create a FIX.4.2 message of type "ExecutionReport"
|
95
190
|
And I set the FIX message at "SenderCompID" to "ITG"
|
@@ -118,8 +213,40 @@ Then the fix message should be:
|
|
118
213
|
}
|
119
214
|
"""
|
120
215
|
|
216
|
+
@fix50
|
217
|
+
Scenario: Building a message of some type and version (using to FIXT/FIX50)
|
218
|
+
|
219
|
+
Given I create a FIXT.1.1 message of type "ExecutionReport"
|
220
|
+
And I set the FIX message at "ApplVerID" to "FIX50SP1"
|
221
|
+
And I set the FIX message at "SenderCompID" to "ITG"
|
222
|
+
And I set the FIX message at "TargetCompID" to "SILO"
|
223
|
+
And I set the FIX message at "MaturityDate" to "20150415"
|
224
|
+
And I set the FIX message at "DayOrderQty" to 23.45
|
225
|
+
And I set the FIX message at "ExchangeForPhysical" to true
|
226
|
+
And I set the FIX message at "AvgPx" to 100.25
|
227
|
+
And I set the FIX message at "OrdType" to "MARKET"
|
228
|
+
And I set the FIX message at "PossDupFlag" to false
|
229
|
+
|
230
|
+
When I get the fix message
|
231
|
+
Then the fix message should be:
|
232
|
+
"""
|
233
|
+
{
|
234
|
+
"BeginString":"FIXT.1.1",
|
235
|
+
"MsgType":"ExecutionReport",
|
236
|
+
"ApplVerID":"FIX50SP1",
|
237
|
+
"SenderCompID":"ITG",
|
238
|
+
"TargetCompID":"SILO",
|
239
|
+
"MaturityDate":"20150415",
|
240
|
+
"DayOrderQty": 23.45,
|
241
|
+
"ExchangeForPhysical": true,
|
242
|
+
"AvgPx": 100.25,
|
243
|
+
"OrdType": "MARKET",
|
244
|
+
"PossDupFlag": false
|
245
|
+
}
|
246
|
+
"""
|
247
|
+
|
121
248
|
|
122
|
-
Scenario: Setting message fields via table
|
249
|
+
Scenario: Setting message fields via table (prior to FIXT/FIX50)
|
123
250
|
Given I create the following FIX.4.2 message of type "ExecutionReport":
|
124
251
|
|SenderCompID | "ITG" |
|
125
252
|
|TargetCompID | "SILO" |
|
@@ -146,3 +273,35 @@ Then the fix message should be:
|
|
146
273
|
"PossDupFlag": false
|
147
274
|
}
|
148
275
|
"""
|
276
|
+
|
277
|
+
@fix50
|
278
|
+
Scenario: Setting message fields via table (prior to FIXT/FIX50)
|
279
|
+
Given I create the following FIXT.1.1 message of type "ExecutionReport":
|
280
|
+
|ApplVerID | "FIX50SP1" |
|
281
|
+
|SenderCompID | "ITG" |
|
282
|
+
|TargetCompID | "SILO" |
|
283
|
+
|MaturityDate | "20150415" |
|
284
|
+
|DayOrderQty | 23.45 |
|
285
|
+
|ExchangeForPhysical | true |
|
286
|
+
|AvgPx | 100.25 |
|
287
|
+
|OrdType | "MARKET" |
|
288
|
+
|PossDupFlag | false |
|
289
|
+
|
290
|
+
When I get the fix message
|
291
|
+
Then the fix message should be:
|
292
|
+
"""
|
293
|
+
{
|
294
|
+
"BeginString":"FIXT.1.1",
|
295
|
+
"MsgType":"ExecutionReport",
|
296
|
+
"ApplVerID":"FIX50SP1",
|
297
|
+
"SenderCompID":"ITG",
|
298
|
+
"TargetCompID":"SILO",
|
299
|
+
"MaturityDate":"20150415",
|
300
|
+
"DayOrderQty": 23.45,
|
301
|
+
"ExchangeForPhysical": true,
|
302
|
+
"AvgPx": 100.25,
|
303
|
+
"OrdType": "MARKET",
|
304
|
+
"PossDupFlag": false
|
305
|
+
}
|
306
|
+
"""
|
307
|
+
|
@@ -24,6 +24,39 @@ And the fix message at tag "SenderCompID" should not be:
|
|
24
24
|
"NOT ITG"
|
25
25
|
"""
|
26
26
|
|
27
|
+
@fix50
|
28
|
+
Scenario: All these checks are acceptable (FIXT/FIX50)
|
29
|
+
Given the following unvalidated fix message:
|
30
|
+
"""
|
31
|
+
8=FIXT.1.135=849=ITG56=SILO315=86=100.25410=50.25424=23.45411=Y43=N40=15=N
|
32
|
+
"""
|
33
|
+
When I get the fix message
|
34
|
+
|
35
|
+
Then the FIX at "SenderCompID" should be "ITG"
|
36
|
+
Then the fix at tag "SenderCompID" should be "ITG"
|
37
|
+
Then the fix message at "SenderCompID" should be "ITG"
|
38
|
+
And the FIX at "SenderCompID" should not be "blah"
|
39
|
+
And the fix message at tag "SenderCompID" should be:
|
40
|
+
"""
|
41
|
+
"ITG"
|
42
|
+
"""
|
43
|
+
And the fix message at tag "SenderCompID" should not be:
|
44
|
+
"""
|
45
|
+
"NOT ITG"
|
46
|
+
"""
|
47
|
+
Then the FIX at "OrdType" should be "MARKET"
|
48
|
+
Then the fix at tag "OrdType" should be "MARKET"
|
49
|
+
Then the fix message at "OrdType" should be "MARKET"
|
50
|
+
And the FIX at "OrdType" should not be "STOP_LIMIT"
|
51
|
+
And the fix message at tag "OrdType" should be:
|
52
|
+
"""
|
53
|
+
"MARKET"
|
54
|
+
"""
|
55
|
+
And the fix message at tag "OrdType" should not be:
|
56
|
+
"""
|
57
|
+
"STOP_LIMIT"
|
58
|
+
"""
|
59
|
+
|
27
60
|
Scenario: Identical Fix as JSON
|
28
61
|
Given the following unvalidated fix message:
|
29
62
|
"""
|
@@ -157,10 +190,25 @@ Given the following unvalidated fix message:
|
|
157
190
|
"""
|
158
191
|
When I get the fix message
|
159
192
|
|
160
|
-
|
161
193
|
Then the fix should have the following:
|
162
194
|
| SenderCompID | "ITG" |
|
163
195
|
| BeginString | "FIX.4.2" |
|
164
196
|
| MaturityDay | 4 |
|
165
197
|
| UnderlyingPutOrCall | 8 |
|
166
198
|
| AvgPx | 100.25 |
|
199
|
+
|
200
|
+
|
201
|
+
@fix50
|
202
|
+
Scenario: Table Format (using FIXT/FIX50)
|
203
|
+
Given the following unvalidated fix message:
|
204
|
+
"""
|
205
|
+
8=FIXT.1.135=849=ITG56=SILO315=86=100.25410=50.25424=23.45411=Y43=N40=15=N
|
206
|
+
"""
|
207
|
+
When I get the fix message
|
208
|
+
|
209
|
+
Then the fix should have the following:
|
210
|
+
| SenderCompID | "ITG" |
|
211
|
+
| BeginString | "FIXT.1.1" |
|
212
|
+
| UnderlyingPutOrCall | 8 |
|
213
|
+
| AvgPx | 100.25 |
|
214
|
+
|
@@ -18,8 +18,19 @@ Then the FIX message type should not be "A"
|
|
18
18
|
|
19
19
|
@with_data_dictionary
|
20
20
|
Scenario: With Data Dictionary loaded, message type is pretty string
|
21
|
+
Given the following fix message:
|
21
22
|
"""
|
22
23
|
8=FIX.4.435=B49=TR_Initiator52=20090101-17:13:06.68456=TR_Acceptor61=033=158=uno58=dos148=abc
|
23
24
|
"""
|
24
25
|
When I get the fix message
|
25
26
|
Then the FIX message type should be "News"
|
27
|
+
|
28
|
+
@with_data_dictionary @fix50
|
29
|
+
Scenario: With FIXT/FIX50 Data Dictionaries loaded, message type is pretty string
|
30
|
+
Given the following fix message:
|
31
|
+
"""
|
32
|
+
8=FIXT.1.135=B49=TR_Initiator52=20090101-17:13:06.68456=TR_Acceptor61=033=158=uno58=dos148=abc
|
33
|
+
"""
|
34
|
+
When I get the fix message
|
35
|
+
Then the FIX message type should be "News"
|
36
|
+
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Feature: Building Fix Messages with repeating groups from raw fix
|
3
3
|
|
4
4
|
@ignore_length_and_checksum
|
5
|
-
Scenario: Building fix message with 2 instances in a repeated group
|
5
|
+
Scenario: Building fix message with 2 instances in a repeated group (prior to FIXT/FIX50)
|
6
6
|
Given the following fix message:
|
7
7
|
"""
|
8
8
|
8=FIX.4.235=B49=ITG56=SILO148=Market Bulls Have Short Sellers on the Run33=258=The bears have been cowed by the bulls.58=Buy buy buy354=043=N40=15=N
|
@@ -30,9 +30,38 @@ Then the FIX message should be:
|
|
30
30
|
}
|
31
31
|
"""
|
32
32
|
|
33
|
+
@ignore_length_and_checksum @fix50
|
34
|
+
Scenario: Building fix message with 2 instances in a repeated group (using FIXT/FIX50)
|
35
|
+
Given the following fix message:
|
36
|
+
"""
|
37
|
+
8=FIXT.1.135=B49=ITG56=SILO148=Market Bulls Have Short Sellers on the Run33=258=The bears have been cowed by the bulls.58=Buy buy buy354=043=N40=15=N
|
38
|
+
"""
|
39
|
+
When I get the fix message
|
40
|
+
|
41
|
+
Then the FIX message should be:
|
42
|
+
"""
|
43
|
+
{
|
44
|
+
"BeginString":"FIXT.1.1",
|
45
|
+
"MsgType":"News",
|
46
|
+
"PossDupFlag":false,
|
47
|
+
"SenderCompID":"ITG",
|
48
|
+
"TargetCompID":"SILO",
|
49
|
+
"Headline":"Market Bulls Have Short Sellers on the Run",
|
50
|
+
"NoLinesOfText":[
|
51
|
+
{
|
52
|
+
"Text":"The bears have been cowed by the bulls."
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"Text":"Buy buy buy",
|
56
|
+
"EncodedTextLen":"0"
|
57
|
+
}
|
58
|
+
]
|
59
|
+
}
|
60
|
+
"""
|
61
|
+
|
33
62
|
|
34
63
|
@ignore_length_and_checksum
|
35
|
-
Scenario: Building fix message with repeating groups in repeating groups
|
64
|
+
Scenario: Building fix message with repeating groups in repeating groups (prior to FIXT/FIX50)
|
36
65
|
Given the following fix message:
|
37
66
|
"""
|
38
67
|
8=FIX.4.235=i49=ITG56=SILO117=ITG_SILO_MASS_QUOTE_001296=1302=Qset001311=JDSU304=1295=1299=Qset001_Q001
|
@@ -61,3 +90,201 @@ Then the FIX message should be:
|
|
61
90
|
]
|
62
91
|
}
|
63
92
|
"""
|
93
|
+
|
94
|
+
@ignore_length_and_checksum @fix50
|
95
|
+
Scenario: Building fix message with repeating groups in repeating groups (using FIXT/FIX50)
|
96
|
+
Given the following fix message:
|
97
|
+
"""
|
98
|
+
8=FIXT.1.135=i49=ITG56=SILO117=ITG_SILO_MASS_QUOTE_001296=1302=Qset001311=JDSU304=1295=1299=Qset001_Q001
|
99
|
+
"""
|
100
|
+
When I get the fix message
|
101
|
+
|
102
|
+
Then the FIX message should be:
|
103
|
+
"""
|
104
|
+
{
|
105
|
+
"BeginString":"FIXT.1.1",
|
106
|
+
"MsgType":"MassQuote",
|
107
|
+
"SenderCompID":"ITG",
|
108
|
+
"TargetCompID":"SILO",
|
109
|
+
"QuoteID":"ITG_SILO_MASS_QUOTE_001",
|
110
|
+
"NoQuoteSets":[
|
111
|
+
{
|
112
|
+
"QuoteSetID":"Qset001",
|
113
|
+
"UnderlyingSymbol":"JDSU",
|
114
|
+
"TotNoQuoteEntries":1,
|
115
|
+
"NoQuoteEntries":[
|
116
|
+
{
|
117
|
+
"QuoteEntryID":"Qset001_Q001"
|
118
|
+
}
|
119
|
+
]
|
120
|
+
}
|
121
|
+
]
|
122
|
+
}
|
123
|
+
"""
|
124
|
+
|
125
|
+
@ignore_length_and_checksum
|
126
|
+
Scenario: Building fix message with repeating group builder (prior to FIXT/FIX50)
|
127
|
+
Given I create the following FIX.4.2 message of type "News":
|
128
|
+
| PossDupFlag | false |
|
129
|
+
| SenderCompID | "ITG" |
|
130
|
+
| TargetCompID | "SILO" |
|
131
|
+
| Headline | "Market Bulls Have Short Sellers on the Run" |
|
132
|
+
And I add the following "LinesOfText" group:
|
133
|
+
| Text | "The bears have been cowed by the bulls." |
|
134
|
+
And I add the following "LinesOfText" group:
|
135
|
+
| Text | "Buy buy buy" |
|
136
|
+
| EncodedTextLen | 0 |
|
137
|
+
When I get the fix message
|
138
|
+
Then the FIX message should be:
|
139
|
+
"""
|
140
|
+
{
|
141
|
+
"BeginString":"FIX.4.2",
|
142
|
+
"MsgType":"News",
|
143
|
+
"PossDupFlag":false,
|
144
|
+
"SenderCompID":"ITG",
|
145
|
+
"TargetCompID":"SILO",
|
146
|
+
"Headline":"Market Bulls Have Short Sellers on the Run",
|
147
|
+
"LinesOfText":[
|
148
|
+
{
|
149
|
+
"Text":"The bears have been cowed by the bulls."
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"Text":"Buy buy buy",
|
153
|
+
"EncodedTextLen":0
|
154
|
+
}
|
155
|
+
]
|
156
|
+
}
|
157
|
+
"""
|
158
|
+
|
159
|
+
@ignore_length_and_checksum @fix50
|
160
|
+
Scenario: Building fix message with repeating group builder (using FIXT/FIX50)
|
161
|
+
Given I create the following FIXT.1.1 message of type "News":
|
162
|
+
| PossDupFlag | false |
|
163
|
+
| SenderCompID | "ITG" |
|
164
|
+
| TargetCompID | "SILO" |
|
165
|
+
| Headline | "In the frozen land of Nador" |
|
166
|
+
And I add the following "NoLinesOfText" group:
|
167
|
+
| Text | "They were forced to eat Robin's minstrels..." |
|
168
|
+
And I add the following "NoLinesOfText" group:
|
169
|
+
| Text | "and there was much rejoicing." |
|
170
|
+
| EncodedTextLen | 0 |
|
171
|
+
When I get the fix message
|
172
|
+
Then the FIX message should be:
|
173
|
+
"""
|
174
|
+
{
|
175
|
+
"BeginString":"FIXT.1.1",
|
176
|
+
"MsgType":"News",
|
177
|
+
"PossDupFlag":false,
|
178
|
+
"SenderCompID":"ITG",
|
179
|
+
"TargetCompID":"SILO",
|
180
|
+
"Headline":"In the frozen land of Nador",
|
181
|
+
"NoLinesOfText":[
|
182
|
+
{
|
183
|
+
"Text":"They were forced to eat Robin's minstrels..."
|
184
|
+
},
|
185
|
+
{
|
186
|
+
"Text":"and there was much rejoicing.",
|
187
|
+
"EncodedTextLen":"0"
|
188
|
+
}
|
189
|
+
]
|
190
|
+
}
|
191
|
+
"""
|
192
|
+
|
193
|
+
|
194
|
+
@ignore_length_and_checksum
|
195
|
+
Scenario: Building fix message with multi nested repeating groups (prior to FIXT/FIX50)
|
196
|
+
Given I create a FIX.4.2 message of type "MassQuote"
|
197
|
+
And I set the FIX message at "SenderCompID" to "ITG"
|
198
|
+
And I set the FIX message at "TargetCompID" to "SILO"
|
199
|
+
And I set the FIX message at "NoQuoteSets/0/TotQuoteEntries" to "2"
|
200
|
+
And I set the FIX message at "NoQuoteSets/0/NoQuoteEntries/0/Symbol" to "TSLA"
|
201
|
+
And I set the FIX message at "NoQuoteSets/0/NoQuoteEntries/1/Symbol" to "IBM"
|
202
|
+
And I set the FIX message at "NoQuoteSets/1/TotQuoteEntries" to "2"
|
203
|
+
And I set the FIX message at "NoQuoteSets/1/NoQuoteEntries/0/Symbol" to "GOOG"
|
204
|
+
And I set the FIX message at "NoQuoteSets/1/NoQuoteEntries/1/Symbol" to "APPL"
|
205
|
+
|
206
|
+
When I get the fix message
|
207
|
+
|
208
|
+
Then the FIX message should be:
|
209
|
+
"""
|
210
|
+
{
|
211
|
+
"BeginString":"FIX.4.2",
|
212
|
+
"MsgType":"MassQuote",
|
213
|
+
"SenderCompID":"ITG",
|
214
|
+
"TargetCompID":"SILO",
|
215
|
+
"NoQuoteSets":[
|
216
|
+
{
|
217
|
+
"TotQuoteEntries":2,
|
218
|
+
"NoQuoteEntries":[
|
219
|
+
{
|
220
|
+
"Symbol":"TSLA"
|
221
|
+
},
|
222
|
+
{
|
223
|
+
"Symbol":"IBM"
|
224
|
+
}
|
225
|
+
]
|
226
|
+
},
|
227
|
+
{
|
228
|
+
"TotQuoteEntries":2,
|
229
|
+
"NoQuoteEntries":[
|
230
|
+
{
|
231
|
+
"Symbol":"GOOG"
|
232
|
+
},
|
233
|
+
{
|
234
|
+
"Symbol":"APPL"
|
235
|
+
}
|
236
|
+
]
|
237
|
+
}
|
238
|
+
]
|
239
|
+
}
|
240
|
+
"""
|
241
|
+
|
242
|
+
|
243
|
+
@ignore_length_and_checksum @fix50
|
244
|
+
Scenario: Building fix message with multi nested repeating groups (using FIXT/FIX50)
|
245
|
+
Given I create a FIXT.1.1 message of type "MassQuote"
|
246
|
+
And I set the FIX message at "SenderCompID" to "ITG"
|
247
|
+
And I set the FIX message at "TargetCompID" to "SILO"
|
248
|
+
And I set the FIX message at "NoQuoteSets/0/TotNoQuoteEntries" to "2"
|
249
|
+
And I set the FIX message at "NoQuoteSets/0/NoQuoteEntries/0/Symbol" to "TSLA"
|
250
|
+
And I set the FIX message at "NoQuoteSets/0/NoQuoteEntries/1/Symbol" to "IBM"
|
251
|
+
And I set the FIX message at "NoQuoteSets/1/TotNoQuoteEntries" to "2"
|
252
|
+
And I set the FIX message at "NoQuoteSets/1/NoQuoteEntries/0/Symbol" to "GOOG"
|
253
|
+
And I set the FIX message at "NoQuoteSets/1/NoQuoteEntries/1/Symbol" to "APPL"
|
254
|
+
|
255
|
+
When I get the fix message
|
256
|
+
|
257
|
+
Then the FIX message should be:
|
258
|
+
"""
|
259
|
+
{
|
260
|
+
"BeginString":"FIXT.1.1",
|
261
|
+
"MsgType":"MassQuote",
|
262
|
+
"SenderCompID":"ITG",
|
263
|
+
"TargetCompID":"SILO",
|
264
|
+
"NoQuoteSets":[
|
265
|
+
{
|
266
|
+
"TotNoQuoteEntries":2,
|
267
|
+
"NoQuoteEntries":[
|
268
|
+
{
|
269
|
+
"Symbol":"TSLA"
|
270
|
+
},
|
271
|
+
{
|
272
|
+
"Symbol":"IBM"
|
273
|
+
}
|
274
|
+
]
|
275
|
+
},
|
276
|
+
{
|
277
|
+
"TotNoQuoteEntries":2,
|
278
|
+
"NoQuoteEntries":[
|
279
|
+
{
|
280
|
+
"Symbol":"GOOG"
|
281
|
+
},
|
282
|
+
{
|
283
|
+
"Symbol":"APPL"
|
284
|
+
}
|
285
|
+
]
|
286
|
+
}
|
287
|
+
]
|
288
|
+
}
|
289
|
+
"""
|
290
|
+
|