use of com.google.gerrit.extensions.api.changes.Changes.QueryRequest in project gerrit by GerritCodeReview.
the class AbstractQueryChangesTest method maxPages.
@Test
public void maxPages() throws Exception {
TestRepository<Repo> repo = createProject("repo");
Change change = insert(repo, newChange(repo));
QueryRequest query = newQuery("status:new").withLimit(10);
assertQuery(query, change);
assertQuery(query.withStart(1));
assertQuery(query.withStart(99));
assertThatQueryException(query.withStart(100)).hasMessageThat().isEqualTo("Cannot go beyond page 10 of results");
assertQuery(query.withLimit(100).withStart(100));
}
Aggregations