diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-12-16 15:02:40 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-12-30 17:30:09 +0100 |
commit | 62894f0c404e71a7b050f3cbecd37b3b08c6061b (patch) | |
tree | 18cbe6459cfa1ee827b076f14c4455e11732a10d /sonar-ws/src/test | |
parent | a120334a10ad2eeb71e744991be120d66e2ea425 (diff) | |
download | sonarqube-62894f0c404e71a7b050f3cbecd37b3b08c6061b.tar.gz sonarqube-62894f0c404e71a7b050f3cbecd37b3b08c6061b.zip |
SONAR-7297 Replace Ruby WS api/issues/bulk_change by Java WS
Diffstat (limited to 'sonar-ws/src/test')
-rw-r--r-- | sonar-ws/src/test/java/org/sonarqube/ws/client/issue/IssuesServiceTest.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/IssuesServiceTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/IssuesServiceTest.java index eea04ace36f..afe379ec78b 100644 --- a/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/IssuesServiceTest.java +++ b/sonar-ws/src/test/java/org/sonarqube/ws/client/issue/IssuesServiceTest.java @@ -28,6 +28,7 @@ import org.sonarqube.ws.client.PostRequest; import org.sonarqube.ws.client.ServiceTester; import org.sonarqube.ws.client.WsConnector; +import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; @@ -63,6 +64,35 @@ public class IssuesServiceTest { } @Test + public void bulk_change() { + underTest.bulkChange(BulkChangeRequest.builder() + .setIssues(asList("ABCD", "EFGH")) + .setAssign("john") + .setSetSeverity("MAJOR") + .setSetType("bugs") + .setDoTransition("confirm") + .setAddTags(asList("tag1", "tag2")) + .setRemoveTags(asList("tag3", "tag4")) + .setComment("some comment") + .setSendNotifications(true) + .build()); + PostRequest request = serviceTester.getPostRequest(); + + assertThat(serviceTester.getPostParser()).isSameAs(Issues.BulkChangeWsResponse.parser()); + serviceTester.assertThat(request) + .hasParam("issues", "ABCD,EFGH") + .hasParam("assign", "john") + .hasParam("set_severity", "MAJOR") + .hasParam("set_type", "bugs") + .hasParam("do_transition", "confirm") + .hasParam("add_tags", "tag1,tag2") + .hasParam("remove_tags", "tag3,tag4") + .hasParam("comment", "some comment") + .hasParam("sendNotifications", "true") + .andNoOtherParam(); + } + + @Test public void changelog() { underTest.changelog("ABCD"); GetRequest getRequest = serviceTester.getGetRequest(); |