quickfix_ruby_ud 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/ext/quickfix/Acceptor.cpp +257 -0
- data/ext/quickfix/Acceptor.h +127 -0
- data/ext/quickfix/Allocator.h +9 -0
- data/ext/quickfix/Application.h +137 -0
- data/ext/quickfix/DOMDocument.h +70 -0
- data/ext/quickfix/DataDictionary.cpp +679 -0
- data/ext/quickfix/DataDictionary.h +607 -0
- data/ext/quickfix/DataDictionaryProvider.cpp +66 -0
- data/ext/quickfix/DataDictionaryProvider.h +67 -0
- data/ext/quickfix/DatabaseConnectionID.h +98 -0
- data/ext/quickfix/DatabaseConnectionPool.h +84 -0
- data/ext/quickfix/Dictionary.cpp +157 -0
- data/ext/quickfix/Dictionary.h +89 -0
- data/ext/quickfix/Event.h +89 -0
- data/ext/quickfix/Except.h +39 -0
- data/ext/quickfix/Exceptions.h +257 -0
- data/ext/quickfix/Field.h +654 -0
- data/ext/quickfix/FieldConvertors.cpp +86 -0
- data/ext/quickfix/FieldConvertors.h +800 -0
- data/ext/quickfix/FieldMap.cpp +254 -0
- data/ext/quickfix/FieldMap.h +327 -0
- data/ext/quickfix/FieldNumbers.h +44 -0
- data/ext/quickfix/FieldTypes.cpp +62 -0
- data/ext/quickfix/FieldTypes.h +817 -0
- data/ext/quickfix/Fields.h +30 -0
- data/ext/quickfix/FileLog.cpp +176 -0
- data/ext/quickfix/FileLog.h +110 -0
- data/ext/quickfix/FileStore.cpp +369 -0
- data/ext/quickfix/FileStore.h +131 -0
- data/ext/quickfix/FixCommonFields.h +13 -0
- data/ext/quickfix/FixFieldNumbers.h +6132 -0
- data/ext/quickfix/FixFields.h +6133 -0
- data/ext/quickfix/FixValues.h +5790 -0
- data/ext/quickfix/Group.cpp +44 -0
- data/ext/quickfix/Group.h +78 -0
- data/ext/quickfix/HostDetailsProvider.cpp +79 -0
- data/ext/quickfix/HostDetailsProvider.h +44 -0
- data/ext/quickfix/HtmlBuilder.h +178 -0
- data/ext/quickfix/HttpConnection.cpp +914 -0
- data/ext/quickfix/HttpConnection.h +74 -0
- data/ext/quickfix/HttpMessage.cpp +229 -0
- data/ext/quickfix/HttpMessage.h +112 -0
- data/ext/quickfix/HttpParser.cpp +49 -0
- data/ext/quickfix/HttpParser.h +49 -0
- data/ext/quickfix/HttpServer.cpp +152 -0
- data/ext/quickfix/HttpServer.h +76 -0
- data/ext/quickfix/Initiator.cpp +310 -0
- data/ext/quickfix/Initiator.h +151 -0
- data/ext/quickfix/Log.cpp +71 -0
- data/ext/quickfix/Log.h +254 -0
- data/ext/quickfix/Message.cpp +617 -0
- data/ext/quickfix/Message.h +419 -0
- data/ext/quickfix/MessageCracker.h +171 -0
- data/ext/quickfix/MessageSorters.cpp +101 -0
- data/ext/quickfix/MessageSorters.h +185 -0
- data/ext/quickfix/MessageStore.cpp +182 -0
- data/ext/quickfix/MessageStore.h +164 -0
- data/ext/quickfix/Mutex.h +120 -0
- data/ext/quickfix/MySQLConnection.h +187 -0
- data/ext/quickfix/MySQLLog.cpp +262 -0
- data/ext/quickfix/MySQLLog.h +158 -0
- data/ext/quickfix/MySQLStore.cpp +323 -0
- data/ext/quickfix/MySQLStore.h +161 -0
- data/ext/quickfix/MySQLStubs.h +203 -0
- data/ext/quickfix/NullStore.cpp +40 -0
- data/ext/quickfix/NullStore.h +89 -0
- data/ext/quickfix/OdbcConnection.h +241 -0
- data/ext/quickfix/OdbcLog.cpp +230 -0
- data/ext/quickfix/OdbcLog.h +109 -0
- data/ext/quickfix/OdbcStore.cpp +313 -0
- data/ext/quickfix/OdbcStore.h +124 -0
- data/ext/quickfix/PUGIXML_DOMDocument.cpp +112 -0
- data/ext/quickfix/PUGIXML_DOMDocument.h +81 -0
- data/ext/quickfix/Parser.cpp +111 -0
- data/ext/quickfix/Parser.h +50 -0
- data/ext/quickfix/PostgreSQLConnection.h +163 -0
- data/ext/quickfix/PostgreSQLLog.cpp +263 -0
- data/ext/quickfix/PostgreSQLLog.h +157 -0
- data/ext/quickfix/PostgreSQLStore.cpp +327 -0
- data/ext/quickfix/PostgreSQLStore.h +160 -0
- data/ext/quickfix/PostgreSQLStubs.h +203 -0
- data/ext/quickfix/Queue.h +66 -0
- data/ext/quickfix/QuickfixRuby.cpp +131900 -0
- data/ext/quickfix/QuickfixRuby.h +56 -0
- data/ext/quickfix/Responder.h +41 -0
- data/ext/quickfix/SSLSocketAcceptor.cpp +409 -0
- data/ext/quickfix/SSLSocketAcceptor.h +186 -0
- data/ext/quickfix/SSLSocketConnection.cpp +434 -0
- data/ext/quickfix/SSLSocketConnection.h +221 -0
- data/ext/quickfix/SSLSocketInitiator.cpp +558 -0
- data/ext/quickfix/SSLSocketInitiator.h +203 -0
- data/ext/quickfix/SSLStubs.h +129 -0
- data/ext/quickfix/Session.cpp +1437 -0
- data/ext/quickfix/Session.h +343 -0
- data/ext/quickfix/SessionFactory.cpp +314 -0
- data/ext/quickfix/SessionFactory.h +84 -0
- data/ext/quickfix/SessionID.h +136 -0
- data/ext/quickfix/SessionSettings.cpp +165 -0
- data/ext/quickfix/SessionSettings.h +283 -0
- data/ext/quickfix/SessionState.h +260 -0
- data/ext/quickfix/Settings.cpp +160 -0
- data/ext/quickfix/Settings.h +56 -0
- data/ext/quickfix/SharedArray.h +274 -0
- data/ext/quickfix/SocketAcceptor.cpp +216 -0
- data/ext/quickfix/SocketAcceptor.h +77 -0
- data/ext/quickfix/SocketConnection.cpp +256 -0
- data/ext/quickfix/SocketConnection.h +102 -0
- data/ext/quickfix/SocketConnector.cpp +112 -0
- data/ext/quickfix/SocketConnector.h +76 -0
- data/ext/quickfix/SocketInitiator.cpp +241 -0
- data/ext/quickfix/SocketInitiator.h +76 -0
- data/ext/quickfix/SocketMonitor.h +26 -0
- data/ext/quickfix/SocketMonitor_UNIX.cpp +238 -0
- data/ext/quickfix/SocketMonitor_UNIX.h +101 -0
- data/ext/quickfix/SocketMonitor_WIN32.cpp +248 -0
- data/ext/quickfix/SocketMonitor_WIN32.h +99 -0
- data/ext/quickfix/SocketServer.cpp +163 -0
- data/ext/quickfix/SocketServer.h +100 -0
- data/ext/quickfix/ThreadedSSLSocketAcceptor.cpp +436 -0
- data/ext/quickfix/ThreadedSSLSocketAcceptor.h +209 -0
- data/ext/quickfix/ThreadedSSLSocketConnection.cpp +364 -0
- data/ext/quickfix/ThreadedSSLSocketConnection.h +191 -0
- data/ext/quickfix/ThreadedSSLSocketInitiator.cpp +434 -0
- data/ext/quickfix/ThreadedSSLSocketInitiator.h +193 -0
- data/ext/quickfix/ThreadedSocketAcceptor.cpp +242 -0
- data/ext/quickfix/ThreadedSocketAcceptor.h +95 -0
- data/ext/quickfix/ThreadedSocketConnection.cpp +227 -0
- data/ext/quickfix/ThreadedSocketConnection.h +89 -0
- data/ext/quickfix/ThreadedSocketInitiator.cpp +238 -0
- data/ext/quickfix/ThreadedSocketInitiator.h +78 -0
- data/ext/quickfix/TimeRange.cpp +227 -0
- data/ext/quickfix/TimeRange.h +215 -0
- data/ext/quickfix/Utility.cpp +639 -0
- data/ext/quickfix/Utility.h +255 -0
- data/ext/quickfix/UtilitySSL.cpp +1612 -0
- data/ext/quickfix/UtilitySSL.h +274 -0
- data/ext/quickfix/Values.h +63 -0
- data/ext/quickfix/config-all.h +10 -0
- data/ext/quickfix/config.h +10 -0
- data/ext/quickfix/config_unix.h +178 -0
- data/ext/quickfix/config_windows.h +0 -0
- data/ext/quickfix/dirent_windows.h +838 -0
- data/ext/quickfix/double-conversion/bignum-dtoa.cc +641 -0
- data/ext/quickfix/double-conversion/bignum-dtoa.h +84 -0
- data/ext/quickfix/double-conversion/bignum.cc +766 -0
- data/ext/quickfix/double-conversion/bignum.h +144 -0
- data/ext/quickfix/double-conversion/cached-powers.cc +176 -0
- data/ext/quickfix/double-conversion/cached-powers.h +64 -0
- data/ext/quickfix/double-conversion/diy-fp.cc +57 -0
- data/ext/quickfix/double-conversion/diy-fp.h +118 -0
- data/ext/quickfix/double-conversion/double-conversion.cc +994 -0
- data/ext/quickfix/double-conversion/double-conversion.h +543 -0
- data/ext/quickfix/double-conversion/fast-dtoa.cc +665 -0
- data/ext/quickfix/double-conversion/fast-dtoa.h +88 -0
- data/ext/quickfix/double-conversion/fixed-dtoa.cc +404 -0
- data/ext/quickfix/double-conversion/fixed-dtoa.h +56 -0
- data/ext/quickfix/double-conversion/ieee.h +402 -0
- data/ext/quickfix/double-conversion/strtod.cc +557 -0
- data/ext/quickfix/double-conversion/strtod.h +45 -0
- data/ext/quickfix/double-conversion/utils.h +374 -0
- data/ext/quickfix/extconf.rb +76 -0
- data/ext/quickfix/index.h +37 -0
- data/ext/quickfix/pugiconfig.hpp +77 -0
- data/ext/quickfix/pugixml.cpp +13237 -0
- data/ext/quickfix/pugixml.hpp +1516 -0
- data/ext/quickfix/scope_guard.hpp +215 -0
- data/ext/quickfix/stdint_msvc.h +254 -0
- data/ext/quickfix/strptime.h +7 -0
- data/lib/quickfix40.rb +274 -0
- data/lib/quickfix41.rb +351 -0
- data/lib/quickfix42.rb +1184 -0
- data/lib/quickfix43.rb +3504 -0
- data/lib/quickfix44.rb +14040 -0
- data/lib/quickfix50.rb +20051 -0
- data/lib/quickfix50sp1.rb +23596 -0
- data/lib/quickfix50sp2.rb +412444 -0
- data/lib/quickfix_fields.rb +79393 -0
- data/lib/quickfix_ruby.rb +82 -0
- data/lib/quickfixt11.rb +65 -0
- data/spec/FIX40.xml +862 -0
- data/spec/FIX41.xml +1282 -0
- data/spec/FIX42.xml +2743 -0
- data/spec/FIX43.xml +4230 -0
- data/spec/FIX44.xml +6600 -0
- data/spec/FIX50.xml +8142 -0
- data/spec/FIX50SP1.xml +9506 -0
- data/spec/FIX50SP2.xml +26069 -0
- data/spec/FIXT11.xml +252 -0
- data/test/DataDictionaryTestCase.rb +268 -0
- data/test/DictionaryTestCase.rb +112 -0
- data/test/FieldBaseTestCase.rb +24 -0
- data/test/MessageStoreTestCase.rb +19 -0
- data/test/MessageTestCase.rb +368 -0
- data/test/SessionSettingsTestCase.rb +41 -0
- metadata +236 -0
data/spec/FIXT11.xml
ADDED
@@ -0,0 +1,252 @@
|
|
1
|
+
<fix type='FIXT' major='1' minor='1' servicepack='0'>
|
2
|
+
<header>
|
3
|
+
<field name='BeginString' required='Y' />
|
4
|
+
<field name='BodyLength' required='Y' />
|
5
|
+
<field name='MsgType' required='Y' />
|
6
|
+
<field name='ApplVerID' required='N' />
|
7
|
+
<field name='ApplExtID' required='N' />
|
8
|
+
<field name='CstmApplVerID' required='N' />
|
9
|
+
<field name='SenderCompID' required='Y' />
|
10
|
+
<field name='TargetCompID' required='Y' />
|
11
|
+
<field name='OnBehalfOfCompID' required='N' />
|
12
|
+
<field name='DeliverToCompID' required='N' />
|
13
|
+
<field name='SecureDataLen' required='N' />
|
14
|
+
<field name='SecureData' required='N' />
|
15
|
+
<field name='MsgSeqNum' required='Y' />
|
16
|
+
<field name='SenderSubID' required='N' />
|
17
|
+
<field name='SenderLocationID' required='N' />
|
18
|
+
<field name='TargetSubID' required='N' />
|
19
|
+
<field name='TargetLocationID' required='N' />
|
20
|
+
<field name='OnBehalfOfSubID' required='N' />
|
21
|
+
<field name='OnBehalfOfLocationID' required='N' />
|
22
|
+
<field name='DeliverToSubID' required='N' />
|
23
|
+
<field name='DeliverToLocationID' required='N' />
|
24
|
+
<field name='PossDupFlag' required='N' />
|
25
|
+
<field name='PossResend' required='N' />
|
26
|
+
<field name='SendingTime' required='Y' />
|
27
|
+
<field name='OrigSendingTime' required='N' />
|
28
|
+
<field name='XmlDataLen' required='N' />
|
29
|
+
<field name='XmlData' required='N' />
|
30
|
+
<field name='MessageEncoding' required='N' />
|
31
|
+
<field name='LastMsgSeqNumProcessed' required='N' />
|
32
|
+
<group name='NoHops' required='N'>
|
33
|
+
<field name='HopCompID' required='N' />
|
34
|
+
<field name='HopSendingTime' required='N' />
|
35
|
+
<field name='HopRefID' required='N' />
|
36
|
+
</group>
|
37
|
+
</header>
|
38
|
+
<messages>
|
39
|
+
<message name='Heartbeat' msgtype='0' msgcat='admin'>
|
40
|
+
<field name='TestReqID' required='N' />
|
41
|
+
</message>
|
42
|
+
<message name='TestRequest' msgtype='1' msgcat='admin'>
|
43
|
+
<field name='TestReqID' required='Y' />
|
44
|
+
</message>
|
45
|
+
<message name='ResendRequest' msgtype='2' msgcat='admin'>
|
46
|
+
<field name='BeginSeqNo' required='Y' />
|
47
|
+
<field name='EndSeqNo' required='Y' />
|
48
|
+
</message>
|
49
|
+
<message name='Reject' msgtype='3' msgcat='admin'>
|
50
|
+
<field name='RefSeqNum' required='Y' />
|
51
|
+
<field name='RefTagID' required='N' />
|
52
|
+
<field name='RefMsgType' required='N' />
|
53
|
+
<field name='RefApplVerID' required='N' />
|
54
|
+
<field name='RefApplExtID' required='N' />
|
55
|
+
<field name='RefCstmApplVerID' required='N' />
|
56
|
+
<field name='SessionRejectReason' required='N' />
|
57
|
+
<field name='Text' required='N' />
|
58
|
+
<field name='EncodedTextLen' required='N' />
|
59
|
+
<field name='EncodedText' required='N' />
|
60
|
+
</message>
|
61
|
+
<message name='SequenceReset' msgtype='4' msgcat='admin'>
|
62
|
+
<field name='GapFillFlag' required='N' />
|
63
|
+
<field name='NewSeqNo' required='Y' />
|
64
|
+
</message>
|
65
|
+
<message name='Logout' msgtype='5' msgcat='admin'>
|
66
|
+
<field name='SessionStatus' required='N' />
|
67
|
+
<field name='Text' required='N' />
|
68
|
+
<field name='EncodedTextLen' required='N' />
|
69
|
+
<field name='EncodedText' required='N' />
|
70
|
+
</message>
|
71
|
+
<message name='Logon' msgtype='A' msgcat='admin'>
|
72
|
+
<field name='EncryptMethod' required='Y' />
|
73
|
+
<field name='HeartBtInt' required='Y' />
|
74
|
+
<field name='RawDataLength' required='N' />
|
75
|
+
<field name='RawData' required='N' />
|
76
|
+
<field name='ResetSeqNumFlag' required='N' />
|
77
|
+
<field name='NextExpectedMsgSeqNum' required='N' />
|
78
|
+
<field name='MaxMessageSize' required='N' />
|
79
|
+
<component name='MsgTypeGrp' required='N' />
|
80
|
+
<field name='TestMessageIndicator' required='N' />
|
81
|
+
<field name='Username' required='N' />
|
82
|
+
<field name='Password' required='N' />
|
83
|
+
<field name='NewPassword' required='N' />
|
84
|
+
<field name='EncryptedPasswordMethod' required='N' />
|
85
|
+
<field name='EncryptedPasswordLen' required='N' />
|
86
|
+
<field name='EncryptedPassword' required='N' />
|
87
|
+
<field name='EncryptedNewPasswordLen' required='N' />
|
88
|
+
<field name='EncryptedNewPassword' required='N' />
|
89
|
+
<field name='SessionStatus' required='N' />
|
90
|
+
<field name='DefaultApplVerID' required='Y' />
|
91
|
+
<field name='DefaultApplExtID' required='N' />
|
92
|
+
<field name='DefaultCstmApplVerID' required='N' />
|
93
|
+
<field name='Text' required='N' />
|
94
|
+
<field name='EncodedTextLen' required='N' />
|
95
|
+
<field name='EncodedText' required='N' />
|
96
|
+
</message>
|
97
|
+
<message name='XMLnonFIX' msgtype='n' msgcat='admin' />
|
98
|
+
</messages>
|
99
|
+
<trailer>
|
100
|
+
<field name='SignatureLength' required='N' />
|
101
|
+
<field name='Signature' required='N' />
|
102
|
+
<field name='CheckSum' required='Y' />
|
103
|
+
</trailer>
|
104
|
+
<components>
|
105
|
+
<component name='HopGrp'>
|
106
|
+
<group name='NoHops' required='N'>
|
107
|
+
<field name='HopCompID' required='N' />
|
108
|
+
<field name='HopSendingTime' required='N' />
|
109
|
+
<field name='HopRefID' required='N' />
|
110
|
+
</group>
|
111
|
+
</component>
|
112
|
+
<component name='MsgTypeGrp' />
|
113
|
+
</components>
|
114
|
+
<fields>
|
115
|
+
<field number='7' name='BeginSeqNo' type='SEQNUM' />
|
116
|
+
<field number='8' name='BeginString' type='STRING' />
|
117
|
+
<field number='9' name='BodyLength' type='LENGTH' />
|
118
|
+
<field number='10' name='CheckSum' type='STRING' />
|
119
|
+
<field number='16' name='EndSeqNo' type='SEQNUM' />
|
120
|
+
<field number='34' name='MsgSeqNum' type='SEQNUM' />
|
121
|
+
<field number='35' name='MsgType' type='STRING' />
|
122
|
+
<field number='36' name='NewSeqNo' type='SEQNUM' />
|
123
|
+
<field number='43' name='PossDupFlag' type='BOOLEAN'>
|
124
|
+
<value enum='N' description='NO' />
|
125
|
+
<value enum='Y' description='YES' />
|
126
|
+
</field>
|
127
|
+
<field number='45' name='RefSeqNum' type='SEQNUM' />
|
128
|
+
<field number='49' name='SenderCompID' type='STRING' />
|
129
|
+
<field number='50' name='SenderSubID' type='STRING' />
|
130
|
+
<field number='52' name='SendingTime' type='UTCTIMESTAMP' />
|
131
|
+
<field number='56' name='TargetCompID' type='STRING' />
|
132
|
+
<field number='57' name='TargetSubID' type='STRING' />
|
133
|
+
<field number='58' name='Text' type='STRING' />
|
134
|
+
<field number='89' name='Signature' type='DATA' />
|
135
|
+
<field number='90' name='SecureDataLen' type='LENGTH' />
|
136
|
+
<field number='91' name='SecureData' type='DATA' />
|
137
|
+
<field number='93' name='SignatureLength' type='LENGTH' />
|
138
|
+
<field number='95' name='RawDataLength' type='LENGTH' />
|
139
|
+
<field number='96' name='RawData' type='DATA' />
|
140
|
+
<field number='97' name='PossResend' type='BOOLEAN'>
|
141
|
+
<value enum='N' description='NO' />
|
142
|
+
<value enum='Y' description='YES' />
|
143
|
+
</field>
|
144
|
+
<field number='98' name='EncryptMethod' type='INT'>
|
145
|
+
<value enum='0' description='NONE_OTHER' />
|
146
|
+
<value enum='1' description='PKCS' />
|
147
|
+
<value enum='2' description='DES' />
|
148
|
+
<value enum='3' description='PKCSDES' />
|
149
|
+
<value enum='4' description='PGPDES' />
|
150
|
+
<value enum='5' description='PGPDESMD5' />
|
151
|
+
<value enum='6' description='PEMDESMD5' />
|
152
|
+
</field>
|
153
|
+
<field number='108' name='HeartBtInt' type='INT' />
|
154
|
+
<field number='112' name='TestReqID' type='STRING' />
|
155
|
+
<field number='115' name='OnBehalfOfCompID' type='STRING' />
|
156
|
+
<field number='116' name='OnBehalfOfSubID' type='STRING' />
|
157
|
+
<field number='122' name='OrigSendingTime' type='UTCTIMESTAMP' />
|
158
|
+
<field number='123' name='GapFillFlag' type='BOOLEAN'>
|
159
|
+
<value enum='N' description='NO' />
|
160
|
+
<value enum='Y' description='YES' />
|
161
|
+
</field>
|
162
|
+
<field number='128' name='DeliverToCompID' type='STRING' />
|
163
|
+
<field number='129' name='DeliverToSubID' type='STRING' />
|
164
|
+
<field number='141' name='ResetSeqNumFlag' type='BOOLEAN'>
|
165
|
+
<value enum='N' description='NO' />
|
166
|
+
<value enum='Y' description='YES' />
|
167
|
+
</field>
|
168
|
+
<field number='142' name='SenderLocationID' type='STRING' />
|
169
|
+
<field number='143' name='TargetLocationID' type='STRING' />
|
170
|
+
<field number='144' name='OnBehalfOfLocationID' type='STRING' />
|
171
|
+
<field number='145' name='DeliverToLocationID' type='STRING' />
|
172
|
+
<field number='212' name='XmlDataLen' type='LENGTH' />
|
173
|
+
<field number='213' name='XmlData' type='DATA' />
|
174
|
+
<field number='347' name='MessageEncoding' type='STRING' />
|
175
|
+
<field number='354' name='EncodedTextLen' type='LENGTH' />
|
176
|
+
<field number='355' name='EncodedText' type='DATA' />
|
177
|
+
<field number='369' name='LastMsgSeqNumProcessed' type='SEQNUM' />
|
178
|
+
<field number='371' name='RefTagID' type='INT' />
|
179
|
+
<field number='372' name='RefMsgType' type='STRING' />
|
180
|
+
<field number='373' name='SessionRejectReason' type='INT'>
|
181
|
+
<value enum='0' description='INVALID_TAG_NUMBER' />
|
182
|
+
<value enum='1' description='REQUIRED_TAG_MISSING' />
|
183
|
+
<value enum='2' description='TAG_NOT_DEFINED_FOR_THIS_MESSAGE_TYPE' />
|
184
|
+
<value enum='3' description='UNDEFINED_TAG' />
|
185
|
+
<value enum='4' description='TAG_SPECIFIED_WITHOUT_A_VALUE' />
|
186
|
+
<value enum='5' description='VALUE_IS_INCORRECT' />
|
187
|
+
<value enum='6' description='INCORRECT_DATA_FORMAT_FOR_VALUE' />
|
188
|
+
<value enum='7' description='DECRYPTION_PROBLEM' />
|
189
|
+
<value enum='8' description='SIGNATURE_PROBLEM' />
|
190
|
+
<value enum='9' description='COMPID_PROBLEM' />
|
191
|
+
<value enum='10' description='SENDINGTIME_ACCURACY_PROBLEM' />
|
192
|
+
<value enum='11' description='INVALID_MSGTYPE' />
|
193
|
+
<value enum='12' description='XML_VALIDATION_ERROR' />
|
194
|
+
<value enum='13' description='TAG_APPEARS_MORE_THAN_ONCE' />
|
195
|
+
<value enum='14' description='TAG_SPECIFIED_OUT_OF_REQUIRED_ORDER' />
|
196
|
+
<value enum='15' description='REPEATING_GROUP_FIELDS_OUT_OF_ORDER' />
|
197
|
+
<value enum='16' description='INCORRECT_NUMINGROUP_COUNT_FOR_REPEATING_GROUP' />
|
198
|
+
<value enum='17' description='NON_DATA_VALUE_INCLUDES_FIELD_DELIMITER' />
|
199
|
+
<value enum='18' description='INVALID_UNSUPPORTED_APPLICATION_VERSION' />
|
200
|
+
<value enum='99' description='OTHER' />
|
201
|
+
</field>
|
202
|
+
<field number='383' name='MaxMessageSize' type='LENGTH' />
|
203
|
+
<field number='464' name='TestMessageIndicator' type='BOOLEAN'>
|
204
|
+
<value enum='N' description='NO' />
|
205
|
+
<value enum='Y' description='YES' />
|
206
|
+
</field>
|
207
|
+
<field number='553' name='Username' type='STRING' />
|
208
|
+
<field number='554' name='Password' type='STRING' />
|
209
|
+
<field number='627' name='NoHops' type='NUMINGROUP' />
|
210
|
+
<field number='628' name='HopCompID' type='STRING' />
|
211
|
+
<field number='629' name='HopSendingTime' type='UTCTIMESTAMP' />
|
212
|
+
<field number='630' name='HopRefID' type='SEQNUM' />
|
213
|
+
<field number='789' name='NextExpectedMsgSeqNum' type='SEQNUM' />
|
214
|
+
<field number='925' name='NewPassword' type='STRING' />
|
215
|
+
<field number='1128' name='ApplVerID' type='STRING'>
|
216
|
+
<value enum='0' description='FIX27' />
|
217
|
+
<value enum='1' description='FIX30' />
|
218
|
+
<value enum='2' description='FIX40' />
|
219
|
+
<value enum='3' description='FIX41' />
|
220
|
+
<value enum='4' description='FIX42' />
|
221
|
+
<value enum='5' description='FIX43' />
|
222
|
+
<value enum='6' description='FIX44' />
|
223
|
+
<value enum='7' description='FIX50' />
|
224
|
+
<value enum='8' description='FIX50_SP1' />
|
225
|
+
<value enum='9' description='FIX50_SP2' />
|
226
|
+
</field>
|
227
|
+
<field number='1129' name='CstmApplVerID' type='STRING' />
|
228
|
+
<field number='1130' name='RefApplVerID' type='STRING' />
|
229
|
+
<field number='1131' name='RefCstmApplVerID' type='STRING' />
|
230
|
+
<field number='1137' name='DefaultApplVerID' type='STRING' />
|
231
|
+
<field number='1156' name='ApplExtID' type='INT' />
|
232
|
+
<field number='1400' name='EncryptedPasswordMethod' type='INT' />
|
233
|
+
<field number='1401' name='EncryptedPasswordLen' type='LENGTH' />
|
234
|
+
<field number='1402' name='EncryptedPassword' type='DATA' />
|
235
|
+
<field number='1403' name='EncryptedNewPasswordLen' type='LENGTH' />
|
236
|
+
<field number='1404' name='EncryptedNewPassword' type='DATA' />
|
237
|
+
<field number='1406' name='RefApplExtID' type='INT' />
|
238
|
+
<field number='1407' name='DefaultApplExtID' type='INT' />
|
239
|
+
<field number='1408' name='DefaultCstmApplVerID' type='STRING' />
|
240
|
+
<field number='1409' name='SessionStatus' type='INT'>
|
241
|
+
<value enum='0' description='SESSION_ACTIVE' />
|
242
|
+
<value enum='1' description='SESSION_PASSWORD_CHANGED' />
|
243
|
+
<value enum='2' description='SESSION_PASSWORD_DUE_TO_EXPIRE' />
|
244
|
+
<value enum='3' description='NEW_SESSION_PASSWORD_DOES_NOT_COMPLY_WITH_POLICY' />
|
245
|
+
<value enum='4' description='SESSION_LOGOUT_COMPLETE' />
|
246
|
+
<value enum='5' description='INVALID_USERNAME_OR_PASSWORD' />
|
247
|
+
<value enum='6' description='ACCOUNT_LOCKED' />
|
248
|
+
<value enum='7' description='LOGONS_ARE_NOT_ALLOWED_AT_THIS_TIME' />
|
249
|
+
<value enum='8' description='PASSWORD_EXPIRED' />
|
250
|
+
</field>
|
251
|
+
</fields>
|
252
|
+
</fix>
|
@@ -0,0 +1,268 @@
|
|
1
|
+
require 'quickfix_ruby'
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
class TooHigh < Quickfix::StringField
|
5
|
+
def initialize(data = nil)
|
6
|
+
if( data == nil )
|
7
|
+
super(501)
|
8
|
+
else
|
9
|
+
super(501, data)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class DataDictionaryTestCase < Test::Unit::TestCase
|
15
|
+
|
16
|
+
def setup
|
17
|
+
@object = Quickfix::DataDictionary.new()
|
18
|
+
assert_not_nil( @object )
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_addMsgType
|
22
|
+
assert( !@object.isMsgType("A") )
|
23
|
+
@object.addMsgType("A")
|
24
|
+
assert( @object.isMsgType("A") )
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_addMsgField
|
28
|
+
assert( !@object.isMsgField( "A", 10 ) )
|
29
|
+
assert( !@object.isMsgField( "Z", 50 ) )
|
30
|
+
@object.addMsgField( "A", 10 )
|
31
|
+
@object.addMsgField( "Z", 50 )
|
32
|
+
assert( @object.isMsgField( "A", 10 ) )
|
33
|
+
assert( @object.isMsgField( "Z", 50 ) )
|
34
|
+
assert( !@object.isMsgField( "A", 50 ) )
|
35
|
+
assert( !@object.isMsgField( "Z", 10 ) )
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_addHeaderField
|
39
|
+
assert( !@object.isHeaderField( 56 ) )
|
40
|
+
assert( !@object.isHeaderField( 49 ) )
|
41
|
+
@object.addHeaderField( 56, true )
|
42
|
+
@object.addHeaderField( 49, true )
|
43
|
+
assert( @object.isHeaderField( 56 ) )
|
44
|
+
assert( @object.isHeaderField( 49 ) )
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_addTrailerField
|
48
|
+
assert( !@object.isTrailerField( 10 ) )
|
49
|
+
@object.addTrailerField( 10, true )
|
50
|
+
assert( @object.isTrailerField( 10 ) )
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_addRequiredField
|
54
|
+
assert( !@object.isRequiredField( "A", 10 ) )
|
55
|
+
assert( !@object.isRequiredField( "Z", 50 ) )
|
56
|
+
@object.addRequiredField( "A", 10 )
|
57
|
+
@object.addRequiredField( "Z", 50 )
|
58
|
+
assert( @object.isRequiredField( "A", 10 ) )
|
59
|
+
assert( @object.isRequiredField( "Z", 50 ) )
|
60
|
+
assert( !@object.isRequiredField( "A", 50 ) )
|
61
|
+
assert( !@object.isRequiredField( "Z", 10 ) )
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_addFieldValue
|
65
|
+
assert( !@object.isFieldValue( 12, "f" ) )
|
66
|
+
assert( !@object.isFieldValue( 12, "g" ) )
|
67
|
+
assert( !@object.isFieldValue( 15, "1" ) )
|
68
|
+
assert( !@object.isFieldValue( 18, "2" ) )
|
69
|
+
assert( !@object.isFieldValue( 167, "FUT" ) )
|
70
|
+
|
71
|
+
@object.addFieldValue( 12, "f" )
|
72
|
+
@object.addFieldValue( 12, "g" )
|
73
|
+
@object.addFieldValue( 15, "1" )
|
74
|
+
@object.addFieldValue( 18, "2" )
|
75
|
+
@object.addFieldValue( 167, "FUT" )
|
76
|
+
|
77
|
+
assert( @object.isFieldValue( 12, "f" ) )
|
78
|
+
assert( @object.isFieldValue( 12, "g" ) )
|
79
|
+
assert( @object.isFieldValue( 15, "1" ) )
|
80
|
+
assert( @object.isFieldValue( 18, "2" ) )
|
81
|
+
assert( @object.isFieldValue( 167, "FUT" ) )
|
82
|
+
end
|
83
|
+
|
84
|
+
def test_addGroup
|
85
|
+
@object.setVersion( "FIX.4.2" )
|
86
|
+
|
87
|
+
group1 = Quickfix::DataDictionary.new
|
88
|
+
group1.addMsgType( "1" )
|
89
|
+
group2 = Quickfix::DataDictionary.new
|
90
|
+
group2.addMsgType( "2" )
|
91
|
+
group3 = Quickfix::DataDictionary.new
|
92
|
+
group3.addMsgType( "3" )
|
93
|
+
|
94
|
+
@object.addGroup( "A", 100, 101, group1 )
|
95
|
+
@object.addGroup( "A", 200, 201, group2 )
|
96
|
+
@object.addGroup( "A", 300, 301, group3 )
|
97
|
+
|
98
|
+
result = @object.getGroup( "A", 100 )
|
99
|
+
assert_equal( 101, result[0] )
|
100
|
+
assert( result[1].isMsgType( "1" ) )
|
101
|
+
|
102
|
+
result = @object.getGroup( "A", 200 )
|
103
|
+
assert_equal( 201, result[0] )
|
104
|
+
assert( result[1].isMsgType( "2" ) )
|
105
|
+
|
106
|
+
result = @object.getGroup( "A", 300 )
|
107
|
+
assert_equal( 301, result[0] )
|
108
|
+
assert( result[1].isMsgType( "3" ) )
|
109
|
+
end
|
110
|
+
|
111
|
+
def test_addFieldName
|
112
|
+
@object.setVersion( "FIX.4.2" )
|
113
|
+
|
114
|
+
@object.addFieldName( 1, "Account" )
|
115
|
+
@object.addFieldName( 11, "ClOrdID" )
|
116
|
+
@object.addFieldName( 8, "BeginString" )
|
117
|
+
|
118
|
+
s = String.new
|
119
|
+
@object.getFieldName(1)
|
120
|
+
assert_equal( "Account", @object.getFieldName(1) )
|
121
|
+
assert_equal( 1, @object.getFieldTag("Account") )
|
122
|
+
assert_equal( "ClOrdID", @object.getFieldName(11) )
|
123
|
+
assert_equal( 11, @object.getFieldTag("ClOrdID") )
|
124
|
+
assert_equal( "BeginString", @object.getFieldName(8) )
|
125
|
+
assert_equal( 8, @object.getFieldTag("BeginString") )
|
126
|
+
end
|
127
|
+
|
128
|
+
def test_addValueName
|
129
|
+
@object.setVersion( "FIX.4.2" )
|
130
|
+
|
131
|
+
@object.addValueName( 12, "0", "VALUE_12_0" )
|
132
|
+
@object.addValueName( 12, "B", "VALUE_12_B" )
|
133
|
+
@object.addValueName( 23, "BOO", "VALUE_23_BOO" )
|
134
|
+
|
135
|
+
assert_equal( "VALUE_12_0", @object.getValueName(12, "0") )
|
136
|
+
assert_equal( "VALUE_12_B", @object.getValueName(12, "B") )
|
137
|
+
assert_equal( "VALUE_23_BOO", @object.getValueName(23, "BOO") )
|
138
|
+
end
|
139
|
+
|
140
|
+
def test_checkValidTagNumber
|
141
|
+
@object.setVersion( Quickfix::BeginString_FIX40() )
|
142
|
+
@object.addField( Quickfix::BeginString.field )
|
143
|
+
@object.addField( Quickfix::BodyLength.field )
|
144
|
+
@object.addField( Quickfix::MsgType.field )
|
145
|
+
@object.addField( Quickfix::CheckSum.field )
|
146
|
+
@object.addField( Quickfix::TestReqID.field )
|
147
|
+
@object.addMsgType( Quickfix::MsgType_TestRequest() )
|
148
|
+
@object.addMsgField( Quickfix::MsgType_TestRequest(), Quickfix::TestReqID.field )
|
149
|
+
|
150
|
+
testReqID = Quickfix::TestReqID.new( "1" )
|
151
|
+
message = Quickfix40::TestRequest.new()
|
152
|
+
message.setField( testReqID )
|
153
|
+
message.setField( TooHigh.new( "value" ) )
|
154
|
+
|
155
|
+
begin
|
156
|
+
@object.validate( message )
|
157
|
+
assert( false )
|
158
|
+
rescue Quickfix::InvalidTagNumber
|
159
|
+
end
|
160
|
+
|
161
|
+
@object.addField( 501 )
|
162
|
+
@object.addMsgField( Quickfix::MsgType_TestRequest(), 501 )
|
163
|
+
begin
|
164
|
+
@object.validate( message )
|
165
|
+
rescue Quickfix::Exception
|
166
|
+
assert( false )
|
167
|
+
end
|
168
|
+
|
169
|
+
message.setField( 5000, "value" )
|
170
|
+
begin
|
171
|
+
@object.validate( message )
|
172
|
+
assert( false )
|
173
|
+
rescue Quickfix::InvalidTagNumber
|
174
|
+
end
|
175
|
+
|
176
|
+
@object.checkUserDefinedFields( false )
|
177
|
+
begin
|
178
|
+
@object.validate( message )
|
179
|
+
rescue Quickfix::Exception
|
180
|
+
assert( false )
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
def test_checkHasValue
|
185
|
+
message = Quickfix40::TestRequest.new
|
186
|
+
message.setField( Quickfix::TestReqID.new )
|
187
|
+
|
188
|
+
begin
|
189
|
+
@object.validate( message )
|
190
|
+
assert( false )
|
191
|
+
rescue Quickfix::NoTagValue
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
def test_checkIsInMessage
|
196
|
+
@object.setVersion( Quickfix::BeginString_FIX40() )
|
197
|
+
@object.addField( Quickfix::BeginString.field )
|
198
|
+
@object.addField( Quickfix::BodyLength.field )
|
199
|
+
@object.addField( Quickfix::MsgType.field )
|
200
|
+
@object.addField( Quickfix::CheckSum.field )
|
201
|
+
@object.addField( Quickfix::TestReqID.field )
|
202
|
+
@object.addField( Quickfix::Symbol.field )
|
203
|
+
@object.addMsgType( Quickfix::MsgType_TestRequest() )
|
204
|
+
@object.addMsgField( Quickfix::MsgType_TestRequest(), Quickfix::TestReqID.field )
|
205
|
+
|
206
|
+
testReqID = Quickfix::TestReqID.new( "1" )
|
207
|
+
|
208
|
+
message = Quickfix40::TestRequest.new
|
209
|
+
message.setField( testReqID )
|
210
|
+
begin
|
211
|
+
@object.validate( message )
|
212
|
+
rescue Quickfix::Exception
|
213
|
+
assert( false )
|
214
|
+
end
|
215
|
+
|
216
|
+
message.setField( Quickfix::Symbol.new("MSFT") )
|
217
|
+
begin
|
218
|
+
@object.validate( message )
|
219
|
+
assert( false )
|
220
|
+
rescue Quickfix::TagNotDefinedForMessage
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
def test_checkHasRequired
|
225
|
+
@object.setVersion( Quickfix::BeginString_FIX40() )
|
226
|
+
@object.addField( Quickfix::BeginString.field )
|
227
|
+
@object.addField( Quickfix::BodyLength.field )
|
228
|
+
@object.addField( Quickfix::MsgType.field )
|
229
|
+
@object.addField( Quickfix::SenderCompID.field )
|
230
|
+
@object.addField( Quickfix::TargetCompID.field )
|
231
|
+
@object.addHeaderField( Quickfix::SenderCompID.field, true )
|
232
|
+
@object.addHeaderField( Quickfix::TargetCompID.field, false )
|
233
|
+
@object.addField( Quickfix::CheckSum.field )
|
234
|
+
@object.addField( Quickfix::TestReqID.field )
|
235
|
+
@object.addMsgType( Quickfix::MsgType_TestRequest() )
|
236
|
+
@object.addMsgField( Quickfix::MsgType_TestRequest(), Quickfix::TestReqID.field )
|
237
|
+
@object.addRequiredField( Quickfix::MsgType_TestRequest(), Quickfix::TestReqID.field )
|
238
|
+
|
239
|
+
message = Quickfix40::TestRequest.new
|
240
|
+
begin
|
241
|
+
@object.validate( message )
|
242
|
+
assert( false )
|
243
|
+
rescue Quickfix::RequiredTagMissing
|
244
|
+
end
|
245
|
+
|
246
|
+
message.getHeader().setField( Quickfix::SenderCompID.new("SENDER") )
|
247
|
+
begin
|
248
|
+
@object.validate( message )
|
249
|
+
assert( false )
|
250
|
+
rescue Quickfix::RequiredTagMissing
|
251
|
+
end
|
252
|
+
|
253
|
+
message.setField( Quickfix::TestReqID.new( "1" ) )
|
254
|
+
begin
|
255
|
+
@object.validate( message )
|
256
|
+
rescue Quickfix::Exception
|
257
|
+
assert( false )
|
258
|
+
end
|
259
|
+
|
260
|
+
message.getHeader().removeField( Quickfix::SenderCompID.field )
|
261
|
+
message.setField( Quickfix::SenderCompID.new("SENDER") )
|
262
|
+
begin
|
263
|
+
@object.validate( message )
|
264
|
+
assert( false )
|
265
|
+
rescue Quickfix::RequiredTagMissing
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
@@ -0,0 +1,112 @@
|
|
1
|
+
require 'quickfix_ruby'
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
class DictionaryTestCase < Test::Unit::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@object = Quickfix::Dictionary.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_setGetString
|
11
|
+
@object.setString( "STRINGKEY1", "STRINGVALUE1" )
|
12
|
+
@object.setString( "STRINGKEY2", "stringvalue2" )
|
13
|
+
|
14
|
+
assert_equal( "STRINGVALUE1", @object.getString("STRINGKEY1") )
|
15
|
+
assert_equal( "stringvalue2", @object.getString("STRINGKEY2") )
|
16
|
+
assert_equal( "STRINGVALUE2", @object.getString("STRINGKEY2", true) )
|
17
|
+
|
18
|
+
begin
|
19
|
+
@object.getString( "STRINGKEY3" )
|
20
|
+
assert( false )
|
21
|
+
rescue Quickfix::ConfigError
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_setGetInt
|
26
|
+
@object.setInt( "LONGKEY1", 12 )
|
27
|
+
@object.setInt( "LONGKEY2", 9827362 )
|
28
|
+
@object.setString( "BADLONGKEY", "AB12" )
|
29
|
+
|
30
|
+
assert_equal( 12, @object.getInt("LONGKEY1") )
|
31
|
+
assert_equal( 9827362, @object.getInt("LONGKEY2") )
|
32
|
+
|
33
|
+
begin
|
34
|
+
@object.getInt( "LONGKEY3" )
|
35
|
+
assert( false )
|
36
|
+
rescue Quickfix::ConfigError
|
37
|
+
end
|
38
|
+
|
39
|
+
begin
|
40
|
+
@object.getInt( "BADLONGKEY" )
|
41
|
+
assert( false )
|
42
|
+
rescue Quickfix::ConfigError
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_setGetDouble
|
47
|
+
@object.setDouble( "DOUBLEKEY1", 12.3 )
|
48
|
+
@object.setDouble( "DOUBLEKEY2", 9827362.9827362 )
|
49
|
+
@object.setString( "BADDOUBLEKEY", "AB12.3" )
|
50
|
+
|
51
|
+
assert_equal( 12.3, @object.getDouble("DOUBLEKEY1") )
|
52
|
+
assert_equal( 9827362.9827362, @object.getDouble("DOUBLEKEY2") )
|
53
|
+
|
54
|
+
begin
|
55
|
+
@object.getDouble( "DOUBLEKEY3" )
|
56
|
+
assert( false )
|
57
|
+
rescue Quickfix::ConfigError
|
58
|
+
end
|
59
|
+
|
60
|
+
begin
|
61
|
+
@object.getDouble( "BADDOUBLEKEY" )
|
62
|
+
assert( false )
|
63
|
+
rescue Quickfix::ConfigError
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_setGetDay
|
68
|
+
@object.setString( "DAY1", "SU" );
|
69
|
+
@object.setString( "DAY2", "MO" );
|
70
|
+
@object.setString( "DAY3", "TU" );
|
71
|
+
@object.setString( "DAY4", "WE" );
|
72
|
+
@object.setString( "DAY5", "TH" );
|
73
|
+
@object.setString( "DAY6", "FR" );
|
74
|
+
@object.setString( "DAY7", "SA" );
|
75
|
+
|
76
|
+
assert( @object.getDay( "DAY1" ) == 1 );
|
77
|
+
assert( @object.getDay( "DAY2" ) == 2 );
|
78
|
+
assert( @object.getDay( "DAY3" ) == 3 );
|
79
|
+
assert( @object.getDay( "DAY4" ) == 4 );
|
80
|
+
assert( @object.getDay( "DAY5" ) == 5 );
|
81
|
+
assert( @object.getDay( "DAY6" ) == 6 );
|
82
|
+
assert( @object.getDay( "DAY7" ) == 7 );
|
83
|
+
|
84
|
+
@object.setDay( "NEXTDAY1", 1 );
|
85
|
+
@object.setDay( "NEXTDAY2", 2 );
|
86
|
+
@object.setDay( "NEXTDAY3", 3 );
|
87
|
+
@object.setDay( "NEXTDAY4", 4 );
|
88
|
+
@object.setDay( "NEXTDAY5", 5 );
|
89
|
+
@object.setDay( "NEXTDAY6", 6 );
|
90
|
+
@object.setDay( "NEXTDAY7", 7 );
|
91
|
+
|
92
|
+
assert( @object.getDay( "NEXTDAY1" ) == 1 );
|
93
|
+
assert( @object.getDay( "NEXTDAY2" ) == 2 );
|
94
|
+
assert( @object.getDay( "NEXTDAY3" ) == 3 );
|
95
|
+
assert( @object.getDay( "NEXTDAY4" ) == 4 );
|
96
|
+
assert( @object.getDay( "NEXTDAY5" ) == 5 );
|
97
|
+
assert( @object.getDay( "NEXTDAY6" ) == 6 );
|
98
|
+
assert( @object.getDay( "NEXTDAY7" ) == 7 );
|
99
|
+
end
|
100
|
+
|
101
|
+
def test_merge
|
102
|
+
@object.setString( "FIRSTKEY", "FIRSTVALUE" );
|
103
|
+
@object.setString( "THIRDKEY", "FIRST" );
|
104
|
+
second = Quickfix::Dictionary.new
|
105
|
+
second.setString( "SECONDKEY", "SECONDVALUE" );
|
106
|
+
second.setString( "THIRDKEY", "SECOND" );
|
107
|
+
@object.merge( second );
|
108
|
+
assert( @object.getString( "FIRSTKEY" ) == "FIRSTVALUE" );
|
109
|
+
assert( @object.getString( "SECONDKEY" ) == "SECONDVALUE" );
|
110
|
+
assert( @object.getString( "THIRDKEY" ) == "FIRST" );
|
111
|
+
end
|
112
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'quickfix_ruby'
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
class FieldBaseTestCase < Test::Unit::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@object = Quickfix::FieldBase.new( 12, "VALUE" )
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_set
|
11
|
+
@object.setString("VALUE")
|
12
|
+
assert(@object.getFixString() == "12=VALUE\001")
|
13
|
+
assert(@object.getTotal() == 542)
|
14
|
+
assert(@object.getLength() == 9)
|
15
|
+
@object.setString("VALUF")
|
16
|
+
assert(@object.getFixString() == "12=VALUF\001")
|
17
|
+
assert(@object.getTotal() == 543)
|
18
|
+
assert(@object.getLength() == 9)
|
19
|
+
@object.setTag(13)
|
20
|
+
assert(@object.getFixString() == "13=VALUF\001")
|
21
|
+
assert(@object.getTotal() == 544)
|
22
|
+
assert(@object.getLength() == 9)
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'quickfix_ruby'
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
class MessageStoreTestCase < Test::Unit::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@object = Quickfix::MemoryStore.new( Quickfix::UtcTimeStamp::now() )
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_setGet
|
11
|
+
@object.set( 1, "hello" )
|
12
|
+
@object.set( 1844674407370955165, "goodbye" )
|
13
|
+
messages = Quickfix::VectorString.new()
|
14
|
+
@object.get( 1, 1844674407370955165, messages )
|
15
|
+
assert( messages.size() == 2 )
|
16
|
+
assert( messages[0] == "hello" )
|
17
|
+
assert( messages[1] == "goodbye" )
|
18
|
+
end
|
19
|
+
end
|