예제 #1
0
 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;
 }
예제 #2
0
  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());
  }
예제 #3
0
  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());
  }
예제 #4
0
  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());
  }
예제 #5
0
 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;
 }
예제 #6
0
 // NON NESTED Groups
 private Quote.NoLegs buildGroupWithStandardFields(String settingValue) {
   final Quote.NoLegs grp = new Quote.NoLegs();
   grp.set(new LegSymbol(settingValue));
   return grp;
 }