|
27 | 27 | import quickfix.field.BodyLength;
|
28 | 28 | import quickfix.field.CheckSum;
|
29 | 29 | import quickfix.field.ClOrdID;
|
| 30 | +import quickfix.field.EffectiveTime; |
30 | 31 | import quickfix.field.HandlInst;
|
31 | 32 | import quickfix.field.LastMkt;
|
32 | 33 | import quickfix.field.MsgSeqNum;
|
@@ -1275,6 +1276,29 @@ public void testGroupWithReqdComponentWithReqdFieldValidation() throws Exception
|
1275 | 1276 | dictionary.validate(quoteRequest, true);
|
1276 | 1277 | }
|
1277 | 1278 |
|
| 1279 | + /** |
| 1280 | + * Field EffectiveTime(168) is defined as UTCTIMESTAMP so an empty string value is invalid but if we allow blank values that should not fail |
| 1281 | + * validation |
| 1282 | + * @throws Exception |
| 1283 | + */ |
| 1284 | + @Test |
| 1285 | + public void testAllowingBlankValuesDisablesFieldValidation() throws Exception { |
| 1286 | + final DataDictionary dictionary = getDictionary(); |
| 1287 | + dictionary.setCheckFieldsHaveValues(false); |
| 1288 | + final quickfix.fix44.NewOrderSingle newSingle = new quickfix.fix44.NewOrderSingle( |
| 1289 | + new ClOrdID("123"), new Side(Side.BUY), new TransactTime(), new OrdType(OrdType.LIMIT) |
| 1290 | + ); |
| 1291 | + newSingle.setField(new OrderQty(42)); |
| 1292 | + newSingle.setField(new Price(42.37)); |
| 1293 | + newSingle.setField(new HandlInst()); |
| 1294 | + newSingle.setField(new Symbol("QFJ")); |
| 1295 | + newSingle.setField(new HandlInst(HandlInst.MANUAL_ORDER_BEST_EXECUTION)); |
| 1296 | + newSingle.setField(new TimeInForce(TimeInForce.DAY)); |
| 1297 | + newSingle.setField(new Account("testAccount")); |
| 1298 | + newSingle.setField(new StringField(EffectiveTime.FIELD)); |
| 1299 | + dictionary.validate(newSingle, true); |
| 1300 | + } |
| 1301 | + |
1278 | 1302 | //
|
1279 | 1303 | // Group Validation Tests in RepeatingGroupTest
|
1280 | 1304 | //
|
|
0 commit comments