Package com.opengamma.master.historicaltimeseries

Examples of com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesInfoSearchResult


  }

  public void test_search_popluatedMaster_filterByExternalIdValue() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setExternalIdValue("B");
    HistoricalTimeSeriesInfoSearchResult result = testPopulated.search(request);
    assertEquals(1, result.getPaging().getTotalItems());
    List<HistoricalTimeSeriesInfoDocument> docs = result.getDocuments();
    assertEquals(1, docs.size());
    assertEquals(true, docs.contains(doc1));
  }
View Full Code Here


  }

  public void test_search_popluatedMaster_filterByExternalIdValue_case() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setExternalIdValue("b");
    HistoricalTimeSeriesInfoSearchResult result = testPopulated.search(request);
    assertEquals(1, result.getPaging().getTotalItems());
    List<HistoricalTimeSeriesInfoDocument> docs = result.getDocuments();
    assertEquals(1, docs.size());
    assertEquals(true, docs.contains(doc1));
  }
View Full Code Here

  }

  public void test_search_populatedMaster_filterByName() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setName("*ame2");
    HistoricalTimeSeriesInfoSearchResult result = testPopulated.search(request);
    assertEquals(1, result.getPaging().getTotalItems());
    List<HistoricalTimeSeriesInfoDocument> docs = result.getDocuments();
    assertEquals(1, docs.size());
    assertEquals(true, docs.contains(doc2));
  }
View Full Code Here

  }

  public void test_search_populatedMaster_filterByDataField() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setDataField("DF2");
    HistoricalTimeSeriesInfoSearchResult result = testPopulated.search(request);
    assertEquals(1, result.getPaging().getTotalItems());
    List<HistoricalTimeSeriesInfoDocument> docs = result.getDocuments();
    assertEquals(1, docs.size());
    assertEquals(true, docs.contains(doc2));
  }
View Full Code Here

  }

  public void test_search_populatedMaster_filterByDataSource() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setDataSource("DS2");
    HistoricalTimeSeriesInfoSearchResult result = testPopulated.search(request);
    assertEquals(1, result.getPaging().getTotalItems());
    List<HistoricalTimeSeriesInfoDocument> docs = result.getDocuments();
    assertEquals(1, docs.size());
    assertEquals(true, docs.contains(doc2));
  }
View Full Code Here

  }

  public void test_search_populatedMaster_filterByDataProvider() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setDataProvider("DP2");
    HistoricalTimeSeriesInfoSearchResult result = testPopulated.search(request);
    assertEquals(1, result.getPaging().getTotalItems());
    List<HistoricalTimeSeriesInfoDocument> docs = result.getDocuments();
    assertEquals(1, docs.size());
    assertEquals(true, docs.contains(doc2));
  }
View Full Code Here

  }

  public void test_search_populatedMaster_filterByObservationTime() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setObservationTime("OT2");
    HistoricalTimeSeriesInfoSearchResult result = testPopulated.search(request);
    assertEquals(1, result.getPaging().getTotalItems());
    List<HistoricalTimeSeriesInfoDocument> docs = result.getDocuments();
    assertEquals(1, docs.size());
    assertEquals(true, docs.contains(doc2));
  }
View Full Code Here

  }

  public void test_remove_populatedMaster() {
    testPopulated.remove(doc1.getUniqueId());
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    HistoricalTimeSeriesInfoSearchResult result = testPopulated.search(request);
    assertEquals(1, result.getPaging().getTotalItems());
    List<HistoricalTimeSeriesInfoDocument> docs = result.getDocuments();
    assertEquals(1, docs.size());
    assertEquals(true, docs.contains(doc2));
  }
View Full Code Here

    request.setValidityDate(LocalDate.now());
    request.setDataSource(BBG_DATA_SOURCE);
    request.setDataProvider(CMPL_DATA_PROVIDER);
    request.setDataField(CLOSE_DATA_FIELD);
   
    HistoricalTimeSeriesInfoSearchResult searchResult = new HistoricalTimeSeriesInfoSearchResult();
    HistoricalTimeSeriesInfoDocument doc = new HistoricalTimeSeriesInfoDocument();
    doc.setUniqueId(UID);
   
    when(_mockResolver.resolve(IDENTIFIERS, LocalDate.now(), BBG_DATA_SOURCE, CMPL_DATA_PROVIDER, CLOSE_DATA_FIELD, null)).thenReturn(new HistoricalTimeSeriesResolutionResult(doc.getInfo()));
   
    doc.getInfo().setTimeSeriesObjectId(UID.getObjectId());
    searchResult.getDocuments().add(doc);
    when(_mockMaster.search(request)).thenReturn(searchResult);
   
    ManageableHistoricalTimeSeries hts = new ManageableHistoricalTimeSeries();
    hts.setUniqueId(UID);
    hts.setTimeSeries(randomTimeSeries());
View Full Code Here

    request.setDataSource(BBG_DATA_SOURCE);
    request.setDataProvider(CMPL_DATA_PROVIDER);
    request.setDataField(CLOSE_DATA_FIELD);
    LocalDateDoubleTimeSeries timeSeries = randomTimeSeries();
   
    HistoricalTimeSeriesInfoSearchResult searchResult = new HistoricalTimeSeriesInfoSearchResult();
    HistoricalTimeSeriesInfoDocument doc = new HistoricalTimeSeriesInfoDocument();
    doc.setUniqueId(UID);
    doc.getInfo().setTimeSeriesObjectId(UID.getObjectId());
    searchResult.getDocuments().add(doc);
   
    when(_mockResolver.resolve(IDENTIFIERS, LocalDate.now(), BBG_DATA_SOURCE, CMPL_DATA_PROVIDER, CLOSE_DATA_FIELD, null)).thenReturn(new HistoricalTimeSeriesResolutionResult(doc.getInfo()));
   
    for (boolean includeStart : new boolean[] {true, false})  {
      for (boolean includeEnd : new boolean[] {true, false}) {
View Full Code Here

TOP

Related Classes of com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesInfoSearchResult

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.