Package com.opengamma.engine.target

Examples of com.opengamma.engine.target.ComputationTargetSpecificationResolver.atVersionCorrection()


    for (ValueRequirement requirement : inRequirements) {
      assertEquals(requirement.getValueName(), MarketDataRequirementNames.MARKET_VALUE);
      assertEquals(requirement.getTargetReference(), inRequirementTarget);
      assertTrue(requirement.getConstraints().isSatisfiedBy(ValueProperties.none()));
    }
    Set<ComputedValue> outputs = _function.execute(_functionExecutionContext, new FunctionInputsImpl(resolver.atVersionCorrection(VersionCorrection.LATEST), new ComputedValue(new ValueSpecification(
        MarketDataRequirementNames.MARKET_VALUE, ComputationTargetSpecification.of(UniqueId.of("ExternalId-LiveData", "USD_GBP")), properties), _rateUSD_GBP)), _matrixTarget,
        Collections.singleton(outRequirement));
    assertEquals(1, outputs.size());
    ComputedValue output = outputs.iterator().next();
    assertTrue(output.getValue() instanceof Double);
View Full Code Here


      assertEquals(requirement.getValueName(), MarketDataRequirementNames.MARKET_VALUE);
      assertEquals(requirement.getTargetReference(), inRequirementTarget);
      assertTrue(requirement.getConstraints().isSatisfiedBy(ValueProperties.none()));
    }
    outputs = _function.execute(_functionExecutionContext,
        new FunctionInputsImpl(resolver.atVersionCorrection(VersionCorrection.LATEST), new ComputedValue(new ValueSpecification(MarketDataRequirementNames.MARKET_VALUE,
            ComputationTargetSpecification.of(UniqueId.of("ExternalId-LiveData", "USD_GBP")), properties), _rateUSD_GBP)), _matrixTarget, Collections.singleton(outRequirement));
    assertEquals(1, outputs.size());
    output = outputs.iterator().next();
    assertTrue(output.getValue() instanceof Double);
    assertEquals(1.0 / _rateUSD_GBP, (Double) output.getValue(), Double.MIN_NORMAL);
View Full Code Here

      assertEquals(requirement.getValueName(), MarketDataRequirementNames.MARKET_VALUE);
      assertEquals(requirement.getTargetReference(), inRequirementTarget);
      assertTrue(requirement.getConstraints().isSatisfiedBy(ValueProperties.none()));
    }
    outputs = _function.execute(_functionExecutionContext,
        new FunctionInputsImpl(resolver.atVersionCorrection(VersionCorrection.LATEST), new ComputedValue(new ValueSpecification(MarketDataRequirementNames.MARKET_VALUE,
            ComputationTargetSpecification.of(UniqueId.of("ExternalId-LiveData", "USD_GBP")), properties), _rateUSD_GBP)), _matrixTarget, Collections.singleton(outRequirement));
    assertEquals(1, outputs.size());
    output = outputs.iterator().next();
    assertTrue(output.getValue() instanceof Double);
    assertEquals(_rateEUR_GBP / _rateUSD_GBP, (Double) output.getValue(), Double.MIN_NORMAL);
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.