Examples of HolidayHistoryResult


Examples of com.opengamma.master.holiday.HolidayHistoryResult

  //-------------------------------------------------------------------------
  @Test
  public void test_history_documents() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertEquals(2, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
    assert201(test.getDocuments().get(1));
  }
View Full Code Here

Examples of com.opengamma.master.holiday.HolidayHistoryResult

  @Test
  public void test_history_documentCountWhenMultipleHolidays() {
    ObjectId oid = ObjectId.of("DbHol", "102");
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertEquals(1, test.getPaging().getTotalItems());
   
    assertEquals(1, test.getDocuments().size());
    assert102(test.getDocuments().get(0));
  }
View Full Code Here

Examples of com.opengamma.master.holiday.HolidayHistoryResult

    assertEquals(base.getCorrectionFromInstant(), old.getCorrectionFromInstant());
    assertEquals(now, old.getCorrectionToInstant())// old version ended
    assertEquals(base.getHoliday(), old.getHoliday());
   
    HolidayHistoryRequest search = new HolidayHistoryRequest(base.getUniqueId(), now, null);
    HolidayHistoryResult searchResult = _holMaster.history(search);
    assertEquals(2, searchResult.getDocuments().size());
  }
View Full Code Here

Examples of com.opengamma.master.holiday.HolidayHistoryResult

  //-------------------------------------------------------------------------
  @Test
  public void test_history_noInstants() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertEquals(PagingRequest.ALL, test.getPaging().getRequest());
    assertEquals(2, test.getPaging().getTotalItems());
   
    assertEquals(2, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
    assert201(test.getDocuments().get(1));
  }
View Full Code Here

Examples of com.opengamma.master.holiday.HolidayHistoryResult

  public void test_history_noInstants_pageOne() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    PagingRequest pr = PagingRequest.ofPage(1, 1);
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    request.setPagingRequest(pr);
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertEquals(pr, test.getPaging().getRequest());
    assertEquals(2, test.getPaging().getTotalItems());
   
    assertEquals(1, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
  }
View Full Code Here

Examples of com.opengamma.master.holiday.HolidayHistoryResult

  public void test_history_noInstants_pageTwo() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    PagingRequest pr = PagingRequest.ofPage(2, 1);
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    request.setPagingRequest(pr);
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertNotNull(test);
    assertNotNull(test.getPaging());
    assertEquals(pr, test.getPaging().getRequest());
    assertEquals(2, test.getPaging().getTotalItems());
   
    assertNotNull(test.getDocuments());
    assertEquals(1, test.getDocuments().size());
    assert201(test.getDocuments().get(0));
  }
View Full Code Here

Examples of com.opengamma.master.holiday.HolidayHistoryResult

  @Test
  public void test_history_versionsFrom_preFirst() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    request.setVersionsFromInstant(_version1Instant.minusSeconds(5));
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertEquals(2, test.getPaging().getTotalItems());
   
    assertEquals(2, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
    assert201(test.getDocuments().get(1));
  }
View Full Code Here

Examples of com.opengamma.master.holiday.HolidayHistoryResult

  @Test
  public void test_history_versionsFrom_firstToSecond() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    request.setVersionsFromInstant(_version1Instant.plusSeconds(5));
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertEquals(2, test.getPaging().getTotalItems());
   
    assertEquals(2, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
    assert201(test.getDocuments().get(1));
  }
View Full Code Here

Examples of com.opengamma.master.holiday.HolidayHistoryResult

  @Test
  public void test_history_versionsFrom_postSecond() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    request.setVersionsFromInstant(_version2Instant.plusSeconds(5));
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertEquals(1, test.getPaging().getTotalItems());
   
    assertEquals(1, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
  }
View Full Code Here

Examples of com.opengamma.master.holiday.HolidayHistoryResult

  @Test
  public void test_history_versionsTo_preFirst() {
    ObjectId oid = ObjectId.of("DbHol", "201");
    HolidayHistoryRequest request = new HolidayHistoryRequest(oid);
    request.setVersionsToInstant(_version1Instant.minusSeconds(5));
    HolidayHistoryResult test = _holMaster.history(request);
   
    assertEquals(0, test.getPaging().getTotalItems());
   
    assertEquals(0, test.getDocuments().size());
  }
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.