]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5742 Add ignorePaging parameter handle to WS client (for IT)
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Fri, 28 Nov 2014 16:25:20 +0000 (17:25 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Fri, 28 Nov 2014 16:25:27 +0000 (17:25 +0100)
server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java
server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java

index 304fee715b984b8d70b1825d01e492f3bd02e1ec..a5d1817b570c4b83e241063bc2bca1b56e401671 100644 (file)
@@ -151,6 +151,15 @@ public class IssueQuery {
     return this;
   }
 
+  /**
+   * Only valid with one component, do not use in the general case
+   * @since 5.0
+   */
+  public IssueQuery ignorePaging(boolean ignorePaging) {
+    params.put("ignorePaging", ignorePaging);
+    return this;
+  }
+
   private IssueQuery addParam(String key, String[] values) {
     if (values != null) {
       params.put(key, EncodingUtils.toQueryParam(values));
index c4d0e209d1444418beff329d011251d407e26ec4..ae1aadd37048c324f65e582cc73131b18f83e49c 100644 (file)
@@ -59,9 +59,10 @@ public class IssueQueryTest {
       .sort("ASSIGNEE")
       .asc(false)
       .pageSize(5)
-      .pageIndex(4);
+      .pageIndex(4)
+      .ignorePaging(true);
 
-    assertThat(query.urlParams()).hasSize(22);
+    assertThat(query.urlParams()).hasSize(23);
     assertThat(query.urlParams()).includes(entry("issues", "ABCDE,FGHIJ"));
     assertThat(query.urlParams()).includes(entry("assignees", "arthur,perceval"));
     assertThat(query.urlParams()).includes(entry("assigned", true));
@@ -84,6 +85,7 @@ public class IssueQueryTest {
     assertThat(query.urlParams()).includes(entry("asc", false));
     assertThat(query.urlParams()).includes(entry("pageSize", 5));
     assertThat(query.urlParams()).includes(entry("pageIndex", 4));
+    assertThat(query.urlParams()).includes(entry("ignorePaging", true));
   }
 
   @Test