Package com.opengamma.engine

Examples of com.opengamma.engine.ComputationTargetSpecification.containing()


    assertEncodeDecodeCycle(ComputationTargetReference.class, req);
  }

  public void testSpecification_nested() {
    ComputationTargetSpecification spec = new ComputationTargetSpecification(ComputationTargetType.SECURITY, UniqueId.of("Foo", "Bar"));
    spec = spec.containing(ComputationTargetType.SECURITY, UniqueId.of("Foo", "Underlying"));
    assertEncodeDecodeCycle(ComputationTargetReference.class, spec);
  }

  public void testRequirement_multiple() {
    final ComputationTargetRequirement req = new ComputationTargetRequirement(ComputationTargetType.POSITION.or(ComputationTargetType.SECURITY), ExternalId.of("Foo", "Bar"));
View Full Code Here


    assertEquals(str, "Value3,{Function=[Test]},(Obj~A~V1,{com.opengamma.core.position.Position,com.opengamma.core.security.Security})");
  }

  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.