Package com.opengamma.engine.marketdata

Examples of com.opengamma.engine.marketdata.MarketDataSnapshot.query()


    client.marketDataReceived(new LiveDataSpecification(client.getDefaultNormalizationRuleSetId(), getTicker("test2")), msg2);
    client.marketDataReceived(new LiveDataSpecification(client.getDefaultNormalizationRuleSetId(), getTicker("test3")), msg3a);
    client.marketDataReceived(new LiveDataSpecification(client.getDefaultNormalizationRuleSetId(), getTicker("test3")), msg3b);
    final MarketDataSnapshot snapshot = provider.snapshot(null);
    snapshot.init(Collections.<ValueSpecification>emptySet(), 0, TimeUnit.MILLISECONDS);
    final Double test1Value = (Double) snapshot.query(test1Specification);
    assertNotNull(test1Value);
    assertEquals(52.07, test1Value, 0.000001);
    final Double test2Value = (Double) snapshot.query(test2Specification);
    assertNotNull(test2Value);
    assertEquals(52.15, test2Value, 0.000001);
View Full Code Here


    final MarketDataSnapshot snapshot = provider.snapshot(null);
    snapshot.init(Collections.<ValueSpecification>emptySet(), 0, TimeUnit.MILLISECONDS);
    final Double test1Value = (Double) snapshot.query(test1Specification);
    assertNotNull(test1Value);
    assertEquals(52.07, test1Value, 0.000001);
    final Double test2Value = (Double) snapshot.query(test2Specification);
    assertNotNull(test2Value);
    assertEquals(52.15, test2Value, 0.000001);
    final Double test3Value = (Double) snapshot.query(test3Specification);
    assertNotNull(test3Value);
    assertEquals(52.17, test3Value, 0.000001);
View Full Code Here

    assertNotNull(test1Value);
    assertEquals(52.07, test1Value, 0.000001);
    final Double test2Value = (Double) snapshot.query(test2Specification);
    assertNotNull(test2Value);
    assertEquals(52.15, test2Value, 0.000001);
    final Double test3Value = (Double) snapshot.query(test3Specification);
    assertNotNull(test3Value);
    assertEquals(52.17, test3Value, 0.000001);
    assertNull(snapshot.query(constructSpecification("invalidticker")));
  }
View Full Code Here

    assertNotNull(test2Value);
    assertEquals(52.15, test2Value, 0.000001);
    final Double test3Value = (Double) snapshot.query(test3Specification);
    assertNotNull(test3Value);
    assertEquals(52.17, test3Value, 0.000001);
    assertNull(snapshot.query(constructSpecification("invalidticker")));
  }

  @Test
  public void testDifferentSpecsSameLiveData1() {
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.