diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-04-30 16:17:58 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-04-30 16:17:58 +0200 |
commit | 65a6f6d2484de42c29972fb5d34e41dba84e8692 (patch) | |
tree | 8f64739f58ab6768bf437c8d448b017cadcf1dec /sonar-ws-client | |
parent | 238f713bf3d10a388f2bbabf1163008f95e15e67 (diff) | |
download | sonarqube-65a6f6d2484de42c29972fb5d34e41dba84e8692.tar.gz sonarqube-65a6f6d2484de42c29972fb5d34e41dba84e8692.zip |
SONAR-3755 Add assigned parameter to IssueQuery
Diffstat (limited to 'sonar-ws-client')
-rw-r--r-- | sonar-ws-client/src/main/java/org/sonar/wsclient/issue/IssueQuery.java | 5 | ||||
-rw-r--r-- | sonar-ws-client/src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java | 4 |
2 files changed, 8 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 dea74706900..5589f5c7ee7 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 @@ -80,6 +80,11 @@ public class IssueQuery { return addParam("assignees", s); } + public IssueQuery assigned(Boolean assigned) { + params.put("assigned", assigned); + return this; + } + public IssueQuery createdAfter(Date d) { params.put("createdAfter", EncodingUtils.toQueryParam(d, true)); return this; 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 de00cb0af06..cffe192920d 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 @@ -36,6 +36,7 @@ public class IssueQueryTest { IssueQuery query = IssueQuery.create() .issues("ABCDE", "FGHIJ") .assignees("arthur", "perceval") + .assigned(true) .components("Action.java", "Filter.java") .componentRoots("struts") .resolutions("FIXED", "FALSE-POSITIVE") @@ -48,9 +49,10 @@ public class IssueQueryTest { .pageSize(5) .pageIndex(4); - assertThat(query.urlParams()).hasSize(13); + assertThat(query.urlParams()).hasSize(14); assertThat(query.urlParams()).includes(entry("issues", "ABCDE,FGHIJ")); assertThat(query.urlParams()).includes(entry("assignees", "arthur,perceval")); + assertThat(query.urlParams()).includes(entry("assigned", true)); assertThat(query.urlParams()).includes(entry("components", "Action.java,Filter.java")); assertThat(query.urlParams()).includes(entry("componentRoots", "struts")); assertThat(query.urlParams()).includes(entry("resolutions", "FIXED,FALSE-POSITIVE")); |