Examples of addPortfolioObjectId()


Examples of com.opengamma.master.portfolio.PortfolioSearchRequest.addPortfolioObjectId()

  }

  @Test
  public void test_search_portfolioIds_one() {
    PortfolioSearchRequest request = new PortfolioSearchRequest();
    request.addPortfolioObjectId(ObjectId.of("DbPrt", "201"));
    request.addPortfolioObjectId(ObjectId.of("DbPrt", "9999"));
    PortfolioSearchResult test = _prtMaster.search(request);
   
    assertEquals(1, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
View Full Code Here

Examples of com.opengamma.master.portfolio.PortfolioSearchRequest.addPortfolioObjectId()

  @Test
  public void test_search_portfolioIds_one() {
    PortfolioSearchRequest request = new PortfolioSearchRequest();
    request.addPortfolioObjectId(ObjectId.of("DbPrt", "201"));
    request.addPortfolioObjectId(ObjectId.of("DbPrt", "9999"));
    PortfolioSearchResult test = _prtMaster.search(request);
   
    assertEquals(1, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
  }
View Full Code Here

Examples of com.opengamma.master.portfolio.PortfolioSearchRequest.addPortfolioObjectId()

  }

  @Test
  public void test_search_portfolioIds_two() {
    PortfolioSearchRequest request = new PortfolioSearchRequest();
    request.addPortfolioObjectId(ObjectId.of("DbPrt", "101"));
    request.addPortfolioObjectId(ObjectId.of("DbPrt", "201"));
    PortfolioSearchResult test = _prtMaster.search(request);
   
    assertEquals(2, test.getDocuments().size());
    assert101(test.getDocuments().get(0), 999);
View Full Code Here

Examples of com.opengamma.master.portfolio.PortfolioSearchRequest.addPortfolioObjectId()

  @Test
  public void test_search_portfolioIds_two() {
    PortfolioSearchRequest request = new PortfolioSearchRequest();
    request.addPortfolioObjectId(ObjectId.of("DbPrt", "101"));
    request.addPortfolioObjectId(ObjectId.of("DbPrt", "201"));
    PortfolioSearchResult test = _prtMaster.search(request);
   
    assertEquals(2, test.getDocuments().size());
    assert101(test.getDocuments().get(0), 999);
    assert202(test.getDocuments().get(1));
View Full Code Here

Examples of com.opengamma.master.portfolio.PortfolioSearchRequest.addPortfolioObjectId()

  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void test_search_portfolioIds_badSchemeValidOid() {
    PortfolioSearchRequest request = new PortfolioSearchRequest();
    request.addPortfolioObjectId(ObjectId.of("Rubbish", "201"));
    _prtMaster.search(request);
  }

  @Test
  public void test_search_nodeIds_none() {
View Full Code Here

Examples of com.opengamma.master.portfolio.PortfolioSearchRequest.addPortfolioObjectId()

  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void test_search_nodeIds_badSchemeValidOid() {
    PortfolioSearchRequest request = new PortfolioSearchRequest();
    request.addPortfolioObjectId(ObjectId.of("Rubbish", "211"));
    _prtMaster.search(request);
  }

  @Test
  public void test_search_portfolioAndNodeIds_matchSome() {
View Full Code Here

Examples of com.opengamma.master.portfolio.PortfolioSearchRequest.addPortfolioObjectId()

  }

  @Test
  public void test_search_portfolioAndNodeIds_matchSome() {
    PortfolioSearchRequest request = new PortfolioSearchRequest();
    request.addPortfolioObjectId(ObjectId.of("DbPrt", "201"));
    request.addNodeObjectId(ObjectId.of("DbPrt", "211"));
    PortfolioSearchResult test = _prtMaster.search(request);
   
    assertEquals(1, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
View Full Code Here

Examples of com.opengamma.master.portfolio.PortfolioSearchRequest.addPortfolioObjectId()

  }

  @Test
  public void test_search_portfolioAndNodeIds_matchNone() {
    PortfolioSearchRequest request = new PortfolioSearchRequest();
    request.addPortfolioObjectId(ObjectId.of("DbPrt", "101"));
    request.addNodeObjectId(ObjectId.of("DbPrt", "211"));
    PortfolioSearchResult test = _prtMaster.search(request);
   
    assertEquals(0, test.getDocuments().size());
  }
View Full Code Here

Examples of com.opengamma.master.portfolio.PortfolioSearchRequest.addPortfolioObjectId()

    searchRequest.setIncludePositions(true)// initially false because of PLAT-2012, now true for portfolio tree
    if (BooleanUtils.isTrue(includeHidden)) {
      searchRequest.setVisibility(DocumentVisibility.HIDDEN);
    }
    for (String portfolioIdStr : portfolioIdStrs) {
      searchRequest.addPortfolioObjectId(ObjectId.parse(portfolioIdStr));
    }
    for (String nodeIdStr : nodeIdStrs) {
      searchRequest.addNodeObjectId(ObjectId.parse(nodeIdStr));
    }
    out.put("searchRequest", searchRequest);
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.