Package com.opengamma.id

Examples of com.opengamma.id.ObjectId


  }

  //-------------------------------------------------------------------------
  @Test
  public void test_history_documents() {
    ObjectId oid = ObjectId.of("DbCfg", "201");
    ConfigHistoryRequest<ExternalId> request = createRequest(oid);
    ConfigHistoryResult<ExternalId> test = _cfgMaster.history(request);
   
    assertEquals(2, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
View Full Code Here


  }

  //-------------------------------------------------------------------------
  @Test
  public void test_history_noInstants() {
    ObjectId oid = ObjectId.of("DbCfg", "201");
    ConfigHistoryRequest<ExternalId> request = createRequest(oid);
    ConfigHistoryResult<ExternalId> test = _cfgMaster.history(request);
   
    assertEquals(PagingRequest.ALL, test.getPaging().getRequest());
    assertEquals(2, test.getPaging().getTotalItems());
View Full Code Here

  }

  //-------------------------------------------------------------------------
  @Test
  public void test_history_noInstants_pageOne() {
    ObjectId oid = ObjectId.of("DbCfg", "201");
    PagingRequest pr = PagingRequest.ofPage(1, 1);
    ConfigHistoryRequest<ExternalId> request = createRequest(oid);
    request.setPagingRequest(pr);
    ConfigHistoryResult<ExternalId> test = _cfgMaster.history(request);
   
View Full Code Here

    assert202(test.getDocuments().get(0));
  }

  @Test
  public void test_history_noInstants_pageTwo() {
    ObjectId oid = ObjectId.of("DbCfg", "201");
    PagingRequest pr = PagingRequest.ofPage(2, 1);
    ConfigHistoryRequest<ExternalId> request = createRequest(oid);
    request.setPagingRequest(pr);
    ConfigHistoryResult<ExternalId> test = _cfgMaster.history(request);
   
View Full Code Here

  }

  //-------------------------------------------------------------------------
  @Test
  public void test_history_versionsFrom_preFirst() {
    ObjectId oid = ObjectId.of("DbCfg", "201");
    ConfigHistoryRequest<ExternalId> request = createRequest(oid);
    request.setVersionsFromInstant(_version1aInstant.minusSeconds(5));
    ConfigHistoryResult<ExternalId> test = _cfgMaster.history(request);
   
    assertEquals(2, test.getPaging().getTotalItems());
View Full Code Here

    assert201(test.getDocuments().get(1));
  }

  @Test
  public void test_history_versionsFrom_firstToSecond() {
    ObjectId oid = ObjectId.of("DbCfg", "201");
    ConfigHistoryRequest<ExternalId> request = createRequest(oid);
    request.setVersionsFromInstant(_version1cInstant.plusSeconds(5));
    ConfigHistoryResult<ExternalId> test = _cfgMaster.history(request);
   
    assertEquals(2, test.getPaging().getTotalItems());
View Full Code Here

    assert201(test.getDocuments().get(1));
  }

  @Test
  public void test_history_versionsFrom_postSecond() {
    ObjectId oid = ObjectId.of("DbCfg", "201");
    ConfigHistoryRequest<ExternalId> request = createRequest(oid);
    request.setVersionsFromInstant(_version2Instant.plusSeconds(5));
    ConfigHistoryResult<ExternalId> test = _cfgMaster.history(request);
   
    assertEquals(1, test.getPaging().getTotalItems());
View Full Code Here

  }

  //-------------------------------------------------------------------------
  @Test
  public void test_history_versionsTo_preFirst() {
    ObjectId oid = ObjectId.of("DbCfg", "201");
    ConfigHistoryRequest<ExternalId> request = createRequest(oid);
    request.setVersionsToInstant(_version1aInstant.minusSeconds(5));
    ConfigHistoryResult<ExternalId> test = _cfgMaster.history(request);
   
    assertEquals(0, test.getPaging().getTotalItems());
View Full Code Here

    assertEquals(0, test.getDocuments().size());
  }

  @Test
  public void test_history_versionsTo_firstToSecond() {
    ObjectId oid = ObjectId.of("DbCfg", "201");
    ConfigHistoryRequest<ExternalId> request = createRequest(oid);
    request.setVersionsToInstant(_version1cInstant.plusSeconds(5));
    ConfigHistoryResult<ExternalId> test = _cfgMaster.history(request);
   
    assertEquals(1, test.getPaging().getTotalItems());
View Full Code Here

    assert201(test.getDocuments().get(0));
  }

  @Test
  public void test_history_versionsTo_postSecond() {
    ObjectId oid = ObjectId.of("DbCfg", "201");
    ConfigHistoryRequest<ExternalId> request = createRequest(oid);
    request.setVersionsToInstant(_version2Instant.plusSeconds(5));
    ConfigHistoryResult<ExternalId> test = _cfgMaster.history(request);
   
    assertEquals(2, test.getPaging().getTotalItems());
View Full Code Here

TOP

Related Classes of com.opengamma.id.ObjectId

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.