Package com.opengamma.financial.security.option

Examples of com.opengamma.financial.security.option.FxFutureOptionSecurity.accept()


  }

  @Test
  public void testFXFutureOptionSecurity() {
    final FxFutureOptionSecurity security = ExposureFunctionTestHelper.getFXFutureOptionSecurity();
    final List<ExternalId> ids = security.accept(new SecurityTypeExposureFunction());
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "FXFUTURE_OPTION"), ids.get(0));
  }

  @Test
View Full Code Here


  @Test
  public void testFXFutureOptionSecurity() {
    final FxFutureOptionSecurity security = ExposureFunctionTestHelper.getFXFutureOptionSecurity();
    final FXFutureSecurity underlying = ExposureFunctionTestHelper.getFXFutureSecurity();
    final List<ExternalId> ids = security.accept(new SecurityAndCurrencyExposureFunction(ExposureFunctionTestHelper.getSecuritySource(underlying)));
    assertEquals(2, ids.size());
    assertTrue(ids.containsAll(Arrays.asList(ExternalId.of(SCHEME, "FXFUTURE_OPTION_USD"), ExternalId.of(SCHEME, "FXFUTURE_OPTION_EUR"))));
  }

  @Test
View Full Code Here

  public void testFXFutureOptionSecurity() {
    final FXFutureSecurity future = ExposureFunctionTestHelper.getFXFutureSecurity();
    final SecuritySource securitySource = ExposureFunctionTestHelper.getSecuritySource(future);
    final ExposureFunction exposureFunction = new UnderlyingExposureFunction(securitySource);
    final FxFutureOptionSecurity security = ExposureFunctionTestHelper.getFXFutureOptionSecurity();
    final List<ExternalId> ids = security.accept(exposureFunction);
    assertNull(ids);
  }

  @Test
  public void testFXFutureSecurity() {
View Full Code Here

  @Test
  public void testFXFutureOptionSecurity() {
    final FxFutureOptionSecurity security = ExposureFunctionTestHelper.getFXFutureOptionSecurity();
    final FXFutureSecurity underlying = ExposureFunctionTestHelper.getFXFutureSecurity();
    final List<ExternalId> ids = security.accept(new CurrencyExposureFunction(ExposureFunctionTestHelper.getSecuritySource(underlying)));
    assertEquals(2, ids.size());
    assertTrue(ids.containsAll(Arrays.asList(ExternalId.of(SCHEME, "USD"), ExternalId.of(SCHEME, "EUR"))));
  }

  @Test
View Full Code Here

  }

  @Test
  public void testFXFutureOptionSecurity() {
    final FxFutureOptionSecurity security = ExposureFunctionTestHelper.getFXFutureOptionSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(ExposureFunction.SECURITY_IDENTIFIER, "FXFUTURE_OPTION_Y"), ids.get(0));
  }

  @Test
View Full Code Here

  }

  @Test
  public void testFXFutureOptionSecurity() {
    final FxFutureOptionSecurity security = ExposureFunctionTestHelper.getFXFutureOptionSecurity();
    final List<ExternalId> ids = security.accept(new SecurityExposureFunction());
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(security.getUniqueId().getScheme(), security.getUniqueId().getValue()), ids.get(0));
  }

  @Test
View Full Code Here

  }

  @Test
  public void testFXFutureOptionSecurity() {
    final FxFutureOptionSecurity security = ExposureFunctionTestHelper.getFXFutureOptionSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }

  @Test
  public void testFXOptionSecurity() {
View Full Code Here

  }

  @Test
  public void testFXFutureOptionSecurity() {
    final FxFutureOptionSecurity security = ExposureFunctionTestHelper.getFXFutureOptionSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(ExposureFunction.SECURITY_IDENTIFIER, "FXFUTURE_OPTION_X"), ids.get(0));
  }

  @Test
View Full Code Here

  @Test
  public void testFXFutureOptionSecurity() {
    final FXFutureSecurity underlying = ExposureFunctionTestHelper.getFXFutureSecurity();
    final ExposureFunction exposureFunction = new ContractCategoryExposureFunction(ExposureFunctionTestHelper.getSecuritySource(underlying));
    final FxFutureOptionSecurity security = ExposureFunctionTestHelper.getFXFutureOptionSecurity();
    final List<ExternalId> ids = security.accept(exposureFunction);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(ExposureFunction.CONTRACT_IDENTIFIER, "Currency"), ids.get(0));
  }

  @Test
View Full Code Here

  @Test
  public void testFXFutureOptionSecurity() {
    final FxFutureOptionSecurity security = ExposureFunctionTestHelper.getFXFutureOptionSecurity();
    final FXFutureSecurity underlying = ExposureFunctionTestHelper.getFXFutureSecurity();
    final List<ExternalId> ids = security.accept(new SecurityAndCurrencyExposureFunction(ExposureFunctionTestHelper.getSecuritySource(underlying)));
    assertEquals(2, ids.size());
    assertTrue(ids.containsAll(Arrays.asList(ExternalId.of(SCHEME, "FXFUTURE_OPTION_USD"), ExternalId.of(SCHEME, "FXFUTURE_OPTION_EUR"))));
  }

  @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.