static void assertEquityOptionSecurity(EquityOptionSecurity expectedOption, Security sec) { assertNotNull(expectedOption); assertNotNull(sec); EquityOptionSecurity actualOption = (EquityOptionSecurity) sec; assertEquals(expectedOption.getExternalIdBundle(), actualOption.getExternalIdBundle()); assertEquals(expectedOption.getUniqueId(), actualOption.getUniqueId()); assertEquals(expectedOption.getSecurityType(), actualOption.getSecurityType()); assertEquals(expectedOption.getCurrency(), actualOption.getCurrency()); assertEquals(expectedOption.getOptionType(), actualOption.getOptionType()); assertTrue(expectedOption.getStrike() == actualOption.getStrike()); assertEquals(expectedOption.getExpiry(), actualOption.getExpiry()); assertEquals(expectedOption.getUnderlyingId(), actualOption.getUnderlyingId()); assertEquals(expectedOption.getName(), actualOption.getName()); // check the lot assertSecurity(expectedOption, sec); }
@Test public void apvEquityOptionByBbgTicker() throws Exception { Security sec = _securityProvider.getSecurity(EXPECTED_APVL_EQUITYOPTION_SEC.getExternalIdBundle()); assertAmericanVanillaEquityOptionSecurity(EXPECTED_APVL_EQUITYOPTION_SEC, sec); }