Beispiel #1
0
  @Test
  public void test_search_pageTwo() {
    UserSearchRequest request = new UserSearchRequest();
    request.setPagingRequest(PagingRequest.ofPage(2, 2));
    UserSearchResult test = _usrMaster.search(request);

    assertEquals(3, test.getPaging().getFirstItemOneBased());
    assertEquals(2, test.getPaging().getPagingSize());
    assertEquals(_totalUsers, test.getPaging().getTotalItems());

    assertEquals(1, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
  }
Beispiel #2
0
  // -------------------------------------------------------------------------
  @Test
  public void test_search_documents() {
    UserSearchRequest request = new UserSearchRequest();
    UserSearchResult test = _usrMaster.search(request);

    assertEquals(1, test.getPaging().getFirstItemOneBased());
    assertEquals(Integer.MAX_VALUE, test.getPaging().getPagingSize());
    assertEquals(_totalUsers, test.getPaging().getTotalItems());

    assertEquals(_totalUsers, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert102(test.getDocuments().get(1));
    assert202(test.getDocuments().get(2));
  }