diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-06-19 08:28:09 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-06-19 08:28:09 +0200 |
commit | 07d0c8f4bfd48c84d9dff39c1f69892e5a1dcc38 (patch) | |
tree | b1a0ea4511dfd0889e8e2b9b9c2d0dc2655db962 /sonar-ws-client/src/test/java/org/sonar | |
parent | bdb21c18c2ac04c2f3664260a04ee9ba6b93a988 (diff) | |
download | sonarqube-07d0c8f4bfd48c84d9dff39c1f69892e5a1dcc38.tar.gz sonarqube-07d0c8f4bfd48c84d9dff39c1f69892e5a1dcc38.zip |
SONAR-4383 Add WS to execute issue filter
Diffstat (limited to 'sonar-ws-client/src/test/java/org/sonar')
-rw-r--r-- | sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java index d262073e26e..6cb81463043 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/issue/internal/DefaultIssueClientTest.java @@ -26,7 +26,6 @@ import org.sonar.wsclient.MockHttpServerInterceptor; import org.sonar.wsclient.base.HttpException; import org.sonar.wsclient.internal.HttpRequestFactory; import org.sonar.wsclient.issue.*; -import org.sonar.wsclient.issue.internal.DefaultIssueClient; import java.util.List; @@ -68,6 +67,19 @@ public class DefaultIssueClientTest { } @Test + public void should_get_issue_filter() { + HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); + httpServer.doReturnBody("{\"issues\": [{\"key\": \"ABCDE\"}]}"); + + IssueClient client = new DefaultIssueClient(requestFactory); + Issues issues = client.filter("5"); + + assertThat(httpServer.requestedPath()).isEqualTo("/api/issues/filter?filter=5"); + assertThat(issues.list()).hasSize(1); + assertThat(issues.list().get(0).key()).isEqualTo("ABCDE"); + } + + @Test public void should_set_severity() { HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); httpServer.doReturnBody("{\"issue\": {\"key\": \"ABCDE\"}}"); |