Package com.opengamma.engine.calcnode

Examples of com.opengamma.engine.calcnode.CalculationJobResult


    final ComputedValue inputValue = new ComputedValue(inputSpec, "Just an input object");

    final ViewComputationCache cache = calcNode.getCache(calcJob.getSpecification());
    cache.putSharedValue(inputValue);

    final CalculationJobResult jobResult = calcNode.executeJob(calcJob);
    assertNotNull(jobResult);
    assertEquals(1, jobResult.getResultItems().size());
    final CalculationJobResultItem resultItem = jobResult.getResultItems().get(0);
    assertEquals(InvocationResult.SUCCESS, resultItem.getResult());
    assertEquals("Nothing we care about", cache.getValue(mockFunction.getResultSpec()));
  }
View Full Code Here


  }

  private CalculationJobResultItem getResultWithLogging(final MockFunction mockFunction, final ThreadLocalLogEventListener logEventListener, final TestCalculationNode calcNode, final CalculationJob calcJob)
      throws AsynchronousExecution {
    LogBridge.getInstance().addListener(logEventListener);
    CalculationJobResult jobResult;
    try {
      jobResult = calcNode.executeJob(calcJob);
    } finally {
      LogBridge.getInstance().removeListener(logEventListener);
    }

    assertNotNull(jobResult);
    assertEquals(1, jobResult.getResultItems().size());
    final CalculationJobResultItem resultItem = jobResult.getResultItems().get(0);
    assertEquals(InvocationResult.SUCCESS, resultItem.getResult());
    final ViewComputationCache cache = calcNode.getCache(calcJob.getSpecification());
    assertEquals("Result", cache.getValue(mockFunction.getResultSpec()));
    return resultItem;
  }
View Full Code Here

TOP

Related Classes of com.opengamma.engine.calcnode.CalculationJobResult

Copyright © 2018 www.massapicom. 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.