From 95ee23dc7e4ee3654c2b925ef056408d76bc0171 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Mon, 6 May 2013 19:16:23 +0200 Subject: SONAR-3755 Add planned parameter on IssueQuery for Issues code viewer --- .../src/main/java/org/sonar/wsclient/issue/IssueQuery.java | 5 +++++ .../src/test/java/org/sonar/wsclient/issue/IssueQueryTest.java | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'sonar-ws-client/src') 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 5589f5c7ee7..011fb506db6 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,11 @@ public class IssueQuery { return this; } + public IssueQuery planned(Boolean planned) { + params.put("planned", planned); + 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 f6dbdf3d84f..7daca96782d 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 @@ -37,6 +37,7 @@ public class IssueQueryTest { .issues("ABCDE", "FGHIJ") .assignees("arthur", "perceval") .assigned(true) + .planned(true) .components("Action.java", "Filter.java") .componentRoots("struts") .resolutions("FIXED", "FALSE-POSITIVE") @@ -49,10 +50,11 @@ public class IssueQueryTest { .pageSize(5) .pageIndex(4); - assertThat(query.urlParams()).hasSize(14); + assertThat(query.urlParams()).hasSize(15); 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("planned", 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")); -- cgit v1.2.3