Examples of LiveMarketDataSpecification


Examples of com.opengamma.engine.marketdata.spec.LiveMarketDataSpecification

    @Override
    public boolean isCompatible(final MarketDataSpecification marketDataSpec) {
      if (!(marketDataSpec instanceof LiveMarketDataSpecification)) {
        return false;
      }
      final LiveMarketDataSpecification liveMarketDataSpec = (LiveMarketDataSpecification) marketDataSpec;
      return _sourceName.equals(liveMarketDataSpec.getDataSource());
    }
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.LiveMarketDataSpecification

    stub(factory2.create(_user)).toReturn(_provider2);
  }

  @Test
  public void createDefault() {
    MarketDataProvider provider = _factory.create(_user, new LiveMarketDataSpecification(null));
    assertEquals(_defaultProvider, provider);
  }
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.LiveMarketDataSpecification

    assertEquals(_defaultProvider, provider);
  }

  @Test
  public void createNamed() {
    MarketDataProvider provider1 = _factory.create(_user, new LiveMarketDataSpecification("1"));
    assertEquals(provider1, _provider1);
    MarketDataProvider provider2 = _factory.create(_user, new LiveMarketDataSpecification("2"));
    assertEquals(provider2, _provider2);
  }
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.LiveMarketDataSpecification

    assertEquals(provider2, _provider2);
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void createMissing() {
    _factory.create(_user, new LiveMarketDataSpecification("3"));
  }
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.LiveMarketDataSpecification

  }

  @Test
  public void liveValid() {
    MarketDataSpecification spec = MarketDataSpecificationParser.parse("live:sourceName");
    assertEquals(new LiveMarketDataSpecification("sourceName"), spec);
  }
View Full Code Here

Examples of com.opengamma.engine.marketdata.spec.LiveMarketDataSpecification

    ViewStatusOption statusOption = ViewStatusOption.getViewStatusReporterOption(s_parser.parse(s_options, args), s_toolContext);
    assertNotNull(statusOption);
   
    assertNotNull(statusOption.getMarketDataSpecification());
    assertTrue(statusOption.getMarketDataSpecification() instanceof LiveMarketDataSpecification);
    LiveMarketDataSpecification marketDataSpecification = (LiveMarketDataSpecification) statusOption.getMarketDataSpecification();
    assertEquals("liveMarketData", marketDataSpecification.getDataSource());
  }
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.