Package com.opengamma.engine.target

Examples of com.opengamma.engine.target.ComputationTargetRequirement.containing()


    assertEncodeDecodeCycle(ComputationTargetReference.class, new ComputationTargetSpecification(ComputationTargetType.NULL, null));
  }

  public void testRequirement_nested() {
    ComputationTargetRequirement req = new ComputationTargetRequirement(ComputationTargetType.SECURITY, ExternalId.of("Foo", "Bar"));
    req = req.containing(ComputationTargetType.SECURITY, ExternalId.of("Foo", "Underlying"));
    assertEncodeDecodeCycle(ComputationTargetReference.class, req);
  }

  public void testSpecification_nested() {
    ComputationTargetSpecification spec = new ComputationTargetSpecification(ComputationTargetType.SECURITY, UniqueId.of("Foo", "Bar"));
View Full Code Here


  }

  public void testNestedTypes() {
    final ComputationTargetSpecification a = new ComputationTargetSpecification(ComputationTargetType.POSITION, UniqueId.of("Pos", "12"));
    final ComputationTargetRequirement b = a.containing(ComputationTargetType.SECURITY, ExternalIdBundle.of(ExternalId.of("B", "2"), ExternalId.of("A", "1")));
    final ComputationTargetSpecification c = b.containing(ComputationTargetType.PRIMITIVE, UniqueId.of("Foo", "Bar"));
    final ValueSpecification spec = new ValueSpecification("Value4", c, ValueProperties.with(ValuePropertyNames.FUNCTION, "Test").get());
    final String str = ValueSpecificationStringEncoder.encodeAsString(spec);
    assertEquals(str, "Value4,{Function=[Test]},(Pos~12,Bundle[A~1, B~2],Foo~Bar,[com.opengamma.core.position.Position,com.opengamma.core.security.Security,com.opengamma.engine.target.Primitive])");
  }
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.