diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-04-22 12:06:38 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-04-22 12:06:38 +0200 |
commit | 617bd05a326531e8d64faa8ba0bf54fbe0bce421 (patch) | |
tree | d8856eaf58d3db52f6610f451506d29a76d7d672 /sonar-ws-client | |
parent | cc5bd59de2151261944161f5324e0adc329a8cd2 (diff) | |
download | sonarqube-617bd05a326531e8d64faa8ba0bf54fbe0bce421.tar.gz sonarqube-617bd05a326531e8d64faa8ba0bf54fbe0bce421.zip |
ONAR-5132 Issues search WS should allow to search by language
Diffstat (limited to 'sonar-ws-client')
-rw-r--r-- | sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java | 3 | ||||
-rw-r--r-- | sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java index e0d38ab0194..304fee715b9 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java @@ -85,6 +85,9 @@ public class IssueQuery { public IssueQuery assignees(String... s) { return addParam("assignees", s); } + public IssueQuery languages(String... s) { + return addParam("languages", s); + } public IssueQuery assigned(Boolean assigned) { params.put("assigned", assigned); diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java index c27a732276d..c4d0e209d14 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java @@ -52,6 +52,7 @@ public class IssueQueryTest { .statuses("OPEN", "CLOSED") .severities("BLOCKER", "INFO") .reporters("login1", "login2") + .languages("xoo", "java") .createdAt(df.parse("2015-01-02T05:59:50:50")) .createdBefore(df.parse("2015-12-13T05:59:50")) .createdAfter(df.parse("2012-01-23T13:40:50")) @@ -60,7 +61,7 @@ public class IssueQueryTest { .pageSize(5) .pageIndex(4); - assertThat(query.urlParams()).hasSize(21); + assertThat(query.urlParams()).hasSize(22); assertThat(query.urlParams()).includes(entry("issues", "ABCDE,FGHIJ")); assertThat(query.urlParams()).includes(entry("assignees", "arthur,perceval")); assertThat(query.urlParams()).includes(entry("assigned", true)); @@ -75,6 +76,7 @@ public class IssueQueryTest { assertThat(query.urlParams()).includes(entry("statuses", "OPEN,CLOSED")); assertThat(query.urlParams()).includes(entry("severities", "BLOCKER,INFO")); assertThat(query.urlParams()).includes(entry("reporters", "login1,login2")); + assertThat(query.urlParams()).includes(entry("languages", "xoo,java")); assertThat((String)query.urlParams().get("createdBefore")).startsWith("2015-12-13T05:59:50"); assertThat((String)query.urlParams().get("createdAfter")).startsWith("2012-01-23T13:40:50"); assertThat((String)query.urlParams().get("createdAt")).startsWith("2015-01-02T05:59:50"); |