Package com.opengamma.engine.calcnode

Examples of com.opengamma.engine.calcnode.CalculationJobResultItem


    final MockFunction mockFunction = getMockLoggingFunction();
    final ThreadLocalLogEventListener logEventListener = new ThreadLocalLogEventListener();
    final TestCalculationNode calcNode = new TestCalculationNode(logEventListener);
    CalculationNodeUtils.configureTestCalcNode(calcNode, mockFunction);
    final CalculationJob calcJob = CalculationNodeUtils.getCalculationJob(mockFunction, ExecutionLogMode.INDICATORS);
    final CalculationJobResultItem resultItemLogIndicators = getResultWithLogging(mockFunction, logEventListener, calcNode, calcJob);

    final ExecutionLog executionLog = resultItemLogIndicators.getExecutionLog();
    assertNotNull(executionLog);
    assertTrue(executionLog.getLogLevels().contains(LogLevel.WARN));
    assertFalse(executionLog.getLogLevels().contains(LogLevel.ERROR));
    assertFalse(executionLog.getLogLevels().contains(LogLevel.INFO));
   
View Full Code Here


    final MockFunction mockFunction = getMockLoggingFunction();
    final ThreadLocalLogEventListener logEventListener = new ThreadLocalLogEventListener();
    final TestCalculationNode calcNode = new TestCalculationNode(logEventListener);
    CalculationNodeUtils.configureTestCalcNode(calcNode, mockFunction);
    final CalculationJob calcJob = CalculationNodeUtils.getCalculationJob(mockFunction, ExecutionLogMode.FULL);
    final CalculationJobResultItem resultItemLogIndicators = getResultWithLogging(mockFunction, logEventListener, calcNode, calcJob);

    final ExecutionLog executionLog = resultItemLogIndicators.getExecutionLog();
    assertNotNull(executionLog);
    assertTrue(executionLog.getLogLevels().contains(LogLevel.WARN));
    assertFalse(executionLog.getLogLevels().contains(LogLevel.ERROR));
    assertFalse(executionLog.getLogLevels().contains(LogLevel.INFO));
   
View Full Code Here

      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.CalculationJobResultItem

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.