Package com.opengamma.master.historicaltimeseries

Examples of com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesInfoSearchResult


  //-------------------------------------------------------------------------
  @Test
  public void test_search_documents() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    HistoricalTimeSeriesInfoSearchResult test = _htsMaster.search(request);
   
    assertEquals(PagingRequest.ALL, test.getPaging().getRequest());
    assertEquals(_totalHistoricalTimeSeries, test.getPaging().getTotalItems());
   
    assertEquals(_totalHistoricalTimeSeries, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
  }
View Full Code Here


  @Test
  public void test_search_pageOne() {
    PagingRequest pr = PagingRequest.ofPage(1, 2);
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setPagingRequest(pr);
    HistoricalTimeSeriesInfoSearchResult test = _htsMaster.search(request);
   
    assertEquals(pr, test.getPaging().getRequest());
    assertEquals(_totalHistoricalTimeSeries, test.getPaging().getTotalItems());
   
    assertEquals(2, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert102(test.getDocuments().get(1));
  }
View Full Code Here

  @Test
  public void test_search_pageTwo() {
    PagingRequest pr = PagingRequest.ofPage(2, 2);
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setPagingRequest(pr);
    HistoricalTimeSeriesInfoSearchResult test = _htsMaster.search(request);
   
    assertEquals(pr, test.getPaging().getRequest());
    assertEquals(_totalHistoricalTimeSeries, test.getPaging().getTotalItems());
   
    assertEquals(1, test.getDocuments().size());
    assert203(test.getDocuments().get(0));
  }
View Full Code Here

  //-------------------------------------------------------------------------
  @Test
  public void test_search_seriesIds_none() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setObjectIds(new ArrayList<ObjectId>());
    HistoricalTimeSeriesInfoSearchResult test = _htsMaster.search(request);
   
    assertEquals(0, test.getDocuments().size());
  }
View Full Code Here

  public void test_search_seriesIds() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.addObjectId(ObjectId.of("DbHts", "101"));
    request.addObjectId(ObjectId.of("DbHts", "201"));
    request.addObjectId(ObjectId.of("DbHts", "9999"));
    HistoricalTimeSeriesInfoSearchResult test = _htsMaster.search(request);
   
    assertEquals(2, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert203(test.getDocuments().get(1));
  }
View Full Code Here

  @Test
  public void test_search_noKeys_Exact_noMatch() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setExternalIdSearch(new ExternalIdSearch());
    request.getExternalIdSearch().setSearchType(ExternalIdSearchType.EXACT);
    HistoricalTimeSeriesInfoSearchResult test = _htsMaster.search(request);
   
    assertEquals(0, test.getDocuments().size());
  }
View Full Code Here

  @Test
  public void test_search_noKeys_All_noMatch() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setExternalIdSearch(new ExternalIdSearch());
    request.getExternalIdSearch().setSearchType(ExternalIdSearchType.ALL);
    HistoricalTimeSeriesInfoSearchResult test = _htsMaster.search(request);
   
    assertEquals(0, test.getDocuments().size());
  }
View Full Code Here

  @Test
  public void test_search_noKeys_Any_noMatch() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setExternalIdSearch(new ExternalIdSearch());
    request.getExternalIdSearch().setSearchType(ExternalIdSearchType.ANY);
    HistoricalTimeSeriesInfoSearchResult test = _htsMaster.search(request);
   
    assertEquals(0, test.getDocuments().size());
  }
View Full Code Here

  @Test
  public void test_search_noKeys_None_noMatch() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.setExternalIdSearch(new ExternalIdSearch());
    request.getExternalIdSearch().setSearchType(ExternalIdSearchType.NONE);
    HistoricalTimeSeriesInfoSearchResult test = _htsMaster.search(request);
   
    assertEquals(_totalHistoricalTimeSeries, test.getDocuments().size());
  }
View Full Code Here

  //-------------------------------------------------------------------------
  @Test
  public void test_search_oneKey_Any_1() {
    HistoricalTimeSeriesInfoSearchRequest request = new HistoricalTimeSeriesInfoSearchRequest();
    request.addExternalId(ExternalId.of("TICKER", "V501"));
    HistoricalTimeSeriesInfoSearchResult test = _htsMaster.search(request);
   
    assertEquals(1, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
  }
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.