assertEquals(res1.getProperty("FundingCurve"), "DefaultFunding");
assertEquals(res1.getProperty("Currency"), "USD");
}
public void testPortfolioNodeOverride() {
final DependencyGraphBuilder builder = createBuilder();
final PositionSource positions = builder.getCompilationContext().getPortfolioStructure().getPositionSource();
final ValueRequirement req1 = createValueRequirement(ComputationTargetSpecification.of(getPortfolioNode(positions, "Position")),
ValueProperties.with("ForwardCurve", "BarForward").with("FundingCurve", "BarFunding").get());
final ValueRequirement req2 = createValueRequirement(ComputationTargetSpecification.of(getPortfolioNode(positions, "PositionAttr")),
ValueProperties.with("ForwardCurve", "BarForward").with("FundingCurve", "BarFunding").get());
builder.addTarget(req1);
builder.addTarget(req2);
builder.getDependencyGraph();
final ValueSpecification res1 = builder.getValueRequirementMapping().get(req1);
final ValueSpecification res2 = builder.getValueRequirementMapping().get(req2);
assertEquals(res1.getProperty("ForwardCurve"), "BarForward");
assertEquals(res1.getProperty("FundingCurve"), "BarFunding");
assertEquals(res1.getProperty("Currency"), "USD");
assertEquals(res2.getProperty("ForwardCurve"), "BarForward");
assertEquals(res2.getProperty("FundingCurve"), "BarFunding");