@Test public void test() { for (int i = 0; i < EXPIRY_OFFSETS.length; i++) { for (int j = 0; j < STRIKES.length; j++) { final String expected = RESULTS[i][j]; final ExternalId actual = PROVIDER.getInstrument(EXPIRY_OFFSETS[i], STRIKES[j], DATE); assertEquals(ExternalSchemes.BLOOMBERG_TICKER_WEAK, actual.getScheme()); assertEquals(expected, actual.getValue()); } } }
@Override public MutableFudgeMsg buildMessage( final FudgeSerializer serializer, final BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider object) { final MutableFudgeMsg message = serializer.newMessage(); FudgeSerializer.addClassHeader( message, BloombergEquityFutureOptionVolatilitySurfaceInstrumentProvider.class); message.add(PREFIX_FIELD_NAME, object.getFutureOptionPrefix()); message.add(POSTFIX_FIELD_NAME, object.getPostfix()); message.add(DATA_FIELD_NAME, object.getDataFieldName()); message.add(CALL_FIELD_NAME, object.useCallAboveStrike()); message.add(EXCHANGE_ID_FIELD_NAME, object.getExchangeIdName()); message.add(TICKER_SCHEME_NAME, object.getSchemeName()); return message; }