Examples of DependencyGraphKey


Examples of com.opengamma.engine.exec.plan.CachingExecutionPlanner.DependencyGraphKey

    final DependencyGraph a = createDependencyGraph();
    final DependencyGraph b = createDependencyGraph();
    // Note: if this test fails because the next two both become true then the DependencyGraphKey class could be redundant
    assertFalse(a.equals(b));
    assertFalse(b.equals(a));
    final DependencyGraphKey ak = new DependencyGraphKey(a, 0);
    final DependencyGraphKey bk = new DependencyGraphKey(b, 0);
    assertTrue(ak.equals(bk));
    assertTrue(bk.equals(ak));
    assertEquals(ak.hashCode(), bk.hashCode());
  }
View Full Code Here

Examples of com.opengamma.engine.exec.plan.CachingExecutionPlanner.DependencyGraphKey

  }

  public void testDependencyGraphKey_initId() {
    final DependencyGraph a = createDependencyGraph();
    final DependencyGraph b = createDependencyGraph();
    final DependencyGraphKey ak = new DependencyGraphKey(a, 1);
    final DependencyGraphKey bk = new DependencyGraphKey(b, 2);
    assertFalse(ak.equals(bk));
    assertFalse(bk.equals(ak));
  }
View Full Code Here

Examples of com.opengamma.engine.exec.plan.CachingExecutionPlanner.DependencyGraphKey

    a.addTerminalOutput(new ValueRequirement("1", ComputationTargetSpecification.of(UniqueId.of("Test", "X"))), new ValueSpecification("1",
        ComputationTargetSpecification.of(UniqueId.of("Test", "X")), ValueProperties.with(ValuePropertyNames.FUNCTION, "Foo1").get()));
    final DependencyGraph b = createDependencyGraph();
    b.addTerminalOutput(new ValueRequirement("2", ComputationTargetSpecification.of(UniqueId.of("Test", "X"))), new ValueSpecification("2",
        ComputationTargetSpecification.of(UniqueId.of("Test", "X")), ValueProperties.with(ValuePropertyNames.FUNCTION, "Foo2").get()));
    final DependencyGraphKey ak = new DependencyGraphKey(a, 0);
    final DependencyGraphKey bk = new DependencyGraphKey(b, 0);
    assertFalse(ak.equals(bk));
    assertFalse(bk.equals(ak));
  }
View Full Code Here

Examples of com.opengamma.engine.exec.plan.CachingExecutionPlanner.DependencyGraphKey

    n.addInputValue(new ValueSpecification("2", ComputationTargetSpecification.of(UniqueId.of("Test", "X")), ValueProperties.with(ValuePropertyNames.FUNCTION, "Bar").get()));
    n.addOutputValue(new ValueSpecification("1", ComputationTargetSpecification.of(UniqueId.of("Test", "A")), ValueProperties.with(ValuePropertyNames.FUNCTION, "Foo").get()));
    n.addOutputValue(new ValueSpecification("2", ComputationTargetSpecification.of(UniqueId.of("Test", "A")), ValueProperties.with(ValuePropertyNames.FUNCTION, "Foo").get()));
    a.addDependencyNode(n);
    final DependencyGraph b = createDependencyGraph();
    final DependencyGraphKey ak = new DependencyGraphKey(a, 0);
    final DependencyGraphKey bk = new DependencyGraphKey(b, 0);
    assertFalse(ak.equals(bk));
    assertFalse(bk.equals(ak));
  }
View Full Code Here

Examples of com.opengamma.engine.exec.plan.CachingExecutionPlanner.DependencyGraphKey

    assertFalse(ak.equals(bk));
    assertFalse(bk.equals(ak));
  }

  public void testDependencyGraphKey_serialization() throws Exception {
    final DependencyGraphKey a = new DependencyGraphKey(createDependencyGraph(), 0);
    final ByteArrayOutputStream baos = new ByteArrayOutputStream();
    final ObjectOutputStream oos = new ObjectOutputStream(baos);
    oos.writeObject(a);
    final ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
    final DependencyGraphKey b = (DependencyGraphKey) ois.readObject();
    assertEquals(b, a);
  }
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.