Examples of resolveSecurity()


Examples of com.opengamma.engine.marketdata.manipulator.SelectorResolver.resolveSecurity()

    ZonedDateTime now = ZonedDateTime.now();
    FXForwardSecurity fxForward = new FXForwardSecurity(Currency.AUD, 123, Currency.CAD, 321, now, region);
    FXOptionSecurity fxOption = new FXOptionSecurity(Currency.AUD, Currency.CAD, 123, 321, new Expiry(now),
                                                     now, true, new AmericanExerciseType());
    SelectorResolver resolver = mock(SelectorResolver.class);
    when(resolver.resolveSecurity(equityId)).thenReturn(equity);
    when(resolver.resolveSecurity(forwardId)).thenReturn(fxForward);
    when(resolver.resolveSecurity(optionId)).thenReturn(fxOption);

    PointSelector lCaseSelector = builder().securityTypes("equity", "fx_forward").getSelector();
    assertNotNull(lCaseSelector.findMatchingSelector(StructureIdentifier.of(equityId), "default", resolver));
View Full Code Here

Examples of com.opengamma.engine.marketdata.manipulator.SelectorResolver.resolveSecurity()

    FXForwardSecurity fxForward = new FXForwardSecurity(Currency.AUD, 123, Currency.CAD, 321, now, region);
    FXOptionSecurity fxOption = new FXOptionSecurity(Currency.AUD, Currency.CAD, 123, 321, new Expiry(now),
                                                     now, true, new AmericanExerciseType());
    SelectorResolver resolver = mock(SelectorResolver.class);
    when(resolver.resolveSecurity(equityId)).thenReturn(equity);
    when(resolver.resolveSecurity(forwardId)).thenReturn(fxForward);
    when(resolver.resolveSecurity(optionId)).thenReturn(fxOption);

    PointSelector lCaseSelector = builder().securityTypes("equity", "fx_forward").getSelector();
    assertNotNull(lCaseSelector.findMatchingSelector(StructureIdentifier.of(equityId), "default", resolver));
    assertNotNull(lCaseSelector.findMatchingSelector(StructureIdentifier.of(forwardId), "default", resolver));
View Full Code Here

Examples of com.opengamma.engine.marketdata.manipulator.SelectorResolver.resolveSecurity()

    FXOptionSecurity fxOption = new FXOptionSecurity(Currency.AUD, Currency.CAD, 123, 321, new Expiry(now),
                                                     now, true, new AmericanExerciseType());
    SelectorResolver resolver = mock(SelectorResolver.class);
    when(resolver.resolveSecurity(equityId)).thenReturn(equity);
    when(resolver.resolveSecurity(forwardId)).thenReturn(fxForward);
    when(resolver.resolveSecurity(optionId)).thenReturn(fxOption);

    PointSelector lCaseSelector = builder().securityTypes("equity", "fx_forward").getSelector();
    assertNotNull(lCaseSelector.findMatchingSelector(StructureIdentifier.of(equityId), "default", resolver));
    assertNotNull(lCaseSelector.findMatchingSelector(StructureIdentifier.of(forwardId), "default", resolver));
    assertNull(lCaseSelector.findMatchingSelector(StructureIdentifier.of(optionId), "default", resolver));
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.