private Quote.NoLegs buildGroupWithCustomAndStandardFields(String settingValue) { final Quote.NoLegs grp = new Quote.NoLegs(); grp.setField(new StringField(9001, settingValue)); // Custom tag is // 9001 grp.set(new LegSymbol(settingValue)); return grp; }
public void testSettingGettingGroupWithStandardFields() throws FieldNotFound { final String settingValue = "SETTING_VALUE"; final Quote.NoLegs grp = buildGroupWithStandardFields(settingValue); final LegSymbol accessorField = new LegSymbol(); final LegSymbol gotField = (LegSymbol) grp.getField(accessorField); // We assume that checksum equality s enough - DV assertEquals( "GettingValue is not the same the SettingValue", settingValue, gotField.getValue()); }
public void testSettingGettingGroupWithCustomFields() throws FieldNotFound { final String settingValue = "SETTING_VALUE"; final Quote.NoLegs grp = buildGroupWithCustomFields(settingValue); final StringField accessorField = new StringField(9001); // Custom tag is // 9001 final StringField gotField = grp.getField(accessorField); // We assume that checksum equality s enough - DV assertEquals( "GettingValue is not the same the SettingValue", settingValue, gotField.getValue()); }
public void testSettingGettingGroupWithCustomAndStandardFields() throws FieldNotFound { final String settingValue = "SETTING_VALUE"; final Quote.NoLegs grp = buildGroupWithCustomAndStandardFields(settingValue); final StringField accessorField = new StringField(9001); // Custom tag is // 9001 final StringField gotField = grp.getField(accessorField); final LegSymbol accessorFieldStd = new LegSymbol(); // Standard Field final LegSymbol gotFieldStd = (LegSymbol) grp.getField(accessorFieldStd); assertEquals( "GettingValue is not the same the SettingValue", settingValue, gotField.getValue()); assertEquals( "GettingValue is not the same the SettingValue", settingValue, gotFieldStd.getValue()); }
private Quote.NoLegs buildGroupWithCustomFields(String settingValue) { final Quote.NoLegs grp = new Quote.NoLegs(); grp.setField(new StringField(9001, settingValue)); // Custom tag is // 9001 return grp; }
// NON NESTED Groups private Quote.NoLegs buildGroupWithStandardFields(String settingValue) { final Quote.NoLegs grp = new Quote.NoLegs(); grp.set(new LegSymbol(settingValue)); return grp; }