Package com.opengamma.util.paging

Examples of com.opengamma.util.paging.PagingRequest


    HolidayDocument m1h3 = holidayDocWithId("m1", "3");
    HolidayDocument m1h4 = holidayDocWithId("m1", "4");
    HolidaySearchResult sr;
    sr = new HolidaySearchResult(ImmutableList.of(m1h1, m1h2, m1h3, m1h4));
   
    PagingRequest ofIndex ;
    ofIndex = PagingRequest.ofIndex(1, 3);
   
    cMaster.applyPaging(sr, ofIndex);
   
    assertEquals(Paging.of(ofIndex, 4), sr.getPaging());
View Full Code Here


  }
 
 
  @Test
  public void pagedSearchEmpty() {
    PagingRequest pr = PagingRequest.ALL;
    List<HolidayDocument> m1Result = Lists.newArrayList();
    List<HolidayDocument> m2Result = Lists.newArrayList();
   
    List<HolidayDocument> result = runPagedSearch(pr, m1Result, 0, m2Result, 0);
   
View Full Code Here

    assertTrue(result.isEmpty());
  }

  @Test
  public void pagedSearchOneElement() {
    PagingRequest pr = PagingRequest.ALL;
    List<HolidayDocument> singleton = Lists.newArrayList(d1);
    List<HolidayDocument> empty = Lists.newArrayList();
   
    List<HolidayDocument> result = runPagedSearch(pr, singleton, 1, empty, 0);
    assertEquals(1, result.size());
View Full Code Here

  }

  @Test
  public void pagedSearchTwoElements() {
    PagingRequest pr;
    List<HolidayDocument> singleton = Lists.newArrayList(d1);
    List<HolidayDocument> empty = Lists.newArrayList();
   
    pr = PagingRequest.ofIndex(0, 1);
    List<HolidayDocument> result2 = runPagedSearch(pr, singleton, 1, singleton, 1);
View Full Code Here

    assertEquals(1, result3.size());
  }

  @Test
  public void pagedSearchMultiple() {
    PagingRequest pr = PagingRequest.ofIndex(2, 2);
    List<HolidayDocument> m1Result = Lists.newArrayList(d1);
    List<HolidayDocument> m2Result = Lists.newArrayList(d2);
    List<HolidayDocument> expected = Lists.newArrayList(d1, d2);
   
    List<HolidayDocument> result = runPagedSearch(pr, m1Result, 3, m2Result, 1);
View Full Code Here

TOP

Related Classes of com.opengamma.util.paging.PagingRequest

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.