]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5954 Reflect WS API changes in WS client
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 6 Jan 2015 11:05:27 +0000 (12:05 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 6 Jan 2015 12:44:52 +0000 (13:44 +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..b9ffe11ea50d0e6f46c093ddab31f2db49e2178d 100644 (file)
@@ -66,8 +66,9 @@ public class IssueQuery {
     return addParam("components", components);
   }
 
-  public IssueQuery componentRoots(String... componentRoots) {
-    return addParam("componentRoots", componentRoots);
+  public IssueQuery onComponentOnly(boolean onComponentOnly) {
+    params.put("onComponentOnly", onComponentOnly);
+    return this;
   }
 
   public IssueQuery rules(String... s) {
index c4d0e209d1444418beff329d011251d407e26ec4..cb19cf35c63b748ed1aad27bc27a660140d4e869 100644 (file)
@@ -43,7 +43,7 @@ public class IssueQueryTest {
       .assigned(true)
       .planned(true)
       .components("Action.java", "Filter.java")
-      .componentRoots("struts")
+      .onComponentOnly(true)
       .resolutions("FIXED", "FALSE-POSITIVE")
       .resolved(true)
       .hideRules(true)
@@ -67,7 +67,7 @@ public class IssueQueryTest {
     assertThat(query.urlParams()).includes(entry("assigned", true));
     assertThat(query.urlParams()).includes(entry("planned", true));
     assertThat(query.urlParams()).includes(entry("components", "Action.java,Filter.java"));
-    assertThat(query.urlParams()).includes(entry("componentRoots", "struts"));
+    assertThat(query.urlParams()).includes(entry("onComponentOnly", true));
     assertThat(query.urlParams()).includes(entry("rules", "squid:AvoidCycle"));
     assertThat(query.urlParams()).includes(entry("actionPlans", "ABC"));
     assertThat(query.urlParams()).includes(entry("resolutions", "FIXED,FALSE-POSITIVE"));