aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ws-client
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2015-01-06 12:05:27 +0100
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2015-01-06 13:44:52 +0100
commit436870f337657eabbb7602543790f1b98e8c02cc (patch)
tree867eead4888d2697acca4278ef286542fcb512a9 /server/sonar-ws-client
parentbf408194039f51018eda3141d59479d41fcf0e5e (diff)
downloadsonarqube-436870f337657eabbb7602543790f1b98e8c02cc.tar.gz
sonarqube-436870f337657eabbb7602543790f1b98e8c02cc.zip
SONAR-5954 Reflect WS API changes in WS client
Diffstat (limited to 'server/sonar-ws-client')
-rw-r--r--server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java5
-rw-r--r--server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java4
2 files changed, 5 insertions, 4 deletions
diff --git a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java
index 304fee715b9..b9ffe11ea50 100644
--- a/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java
+++ b/server/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java
@@ -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) {
diff --git a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java
index c4d0e209d14..cb19cf35c63 100644
--- a/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java
+++ b/server/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java
@@ -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"));