Examples of OrganizationHistoryResult


Examples of com.opengamma.master.orgs.OrganizationHistoryResult

  }

  //-------------------------------------------------------------------------
  @Override
  public OrganizationHistoryResult history(final OrganizationHistoryRequest request) {
    return doHistory(request, new OrganizationHistoryResult(), new OrganizationDocumentExtractor());
  }
View Full Code Here

Examples of com.opengamma.master.orgs.OrganizationHistoryResult

    assertEquals(base.getCorrectionFromInstant(), old.getCorrectionFromInstant());
    assertEquals(base.getCorrectionToInstant(), old.getCorrectionToInstant());
    assertEquals(base.getOrganization(), old.getOrganization());

    OrganizationHistoryRequest search = new OrganizationHistoryRequest(base.getUniqueId(), null, now);
    OrganizationHistoryResult searchResult = _orgMaster.history(search);
    assertEquals(2, searchResult.getDocuments().size());
  }
View Full Code Here

Examples of com.opengamma.master.orgs.OrganizationHistoryResult

  @Test
  public void test_history_documents() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    OrganizationHistoryResult test = _orgMaster.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.orgs.OrganizationHistoryResult

  @Test
  public void test_history_documentCountWhenMultipleOrganizations() {
    ObjectId oid = ObjectId.of("DbOrg", "102");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    OrganizationHistoryResult test = _orgMaster.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.orgs.OrganizationHistoryResult

  @Test
  public void test_history_noInstants() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    OrganizationHistoryResult test = _orgMaster.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.orgs.OrganizationHistoryResult

  public void test_history_noInstants_pageOne() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    PagingRequest pr = PagingRequest.ofPage(1, 1);
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    request.setPagingRequest(pr);
    OrganizationHistoryResult test = _orgMaster.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.orgs.OrganizationHistoryResult

  public void test_history_noInstants_pageTwo() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    PagingRequest pr = PagingRequest.ofPage(2, 1);
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    request.setPagingRequest(pr);
    OrganizationHistoryResult test = _orgMaster.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.orgs.OrganizationHistoryResult

  @Test
  public void test_history_versionsFrom_preFirst() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    request.setVersionsFromInstant(_version1Instant.minusSeconds(5));
    OrganizationHistoryResult test = _orgMaster.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.orgs.OrganizationHistoryResult

  @Test
  public void test_history_versionsFrom_firstToSecond() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    request.setVersionsFromInstant(_version1Instant.plusSeconds(5));
    OrganizationHistoryResult test = _orgMaster.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.orgs.OrganizationHistoryResult

  @Test
  public void test_history_versionsFrom_postSecond() {
    ObjectId oid = ObjectId.of("DbOrg", "201");
    OrganizationHistoryRequest request = new OrganizationHistoryRequest(oid);
    request.setVersionsFromInstant(_version2Instant.plusSeconds(5));
    OrganizationHistoryResult test = _orgMaster.history(request);

    assertEquals(1, test.getPaging().getTotalItems());

    assertEquals(1, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
  }
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.