Package com.opengamma.engine.marketdata.spec

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


    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

    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

    assertEquals(provider2, _provider2);
  }

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

  }

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

    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

Related Classes of com.opengamma.engine.marketdata.spec.LiveMarketDataSpecification

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.