diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2017-08-11 19:37:42 +0200 |
---|---|---|
committer | Janos Gyerik <janos.gyerik@sonarsource.com> | 2017-09-12 10:59:56 +0200 |
commit | 50328a09b14418b47232bb75665040fc755d6b58 (patch) | |
tree | 724fc1df6b10765228f85e1e3be7765e1b742851 /sonar-ws/src/test | |
parent | 7fbdc10fe125547f2d61bfcc00aa31a63242d482 (diff) | |
download | sonarqube-50328a09b14418b47232bb75665040fc755d6b58.tar.gz sonarqube-50328a09b14418b47232bb75665040fc755d6b58.zip |
SONAR-9616 Create api/projectbranches/show
Diffstat (limited to 'sonar-ws/src/test')
-rw-r--r-- | sonar-ws/src/test/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceTest.java index c3dbc7c581b..54bec8cd894 100644 --- a/sonar-ws/src/test/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceTest.java +++ b/sonar-ws/src/test/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceTest.java @@ -23,12 +23,14 @@ package org.sonarqube.ws.client.projectbranches; import org.junit.Rule; import org.junit.Test; import org.sonarqube.ws.WsBranches.ListWsResponse; +import org.sonarqube.ws.WsBranches.ShowWsResponse; import org.sonarqube.ws.client.GetRequest; import org.sonarqube.ws.client.ServiceTester; import org.sonarqube.ws.client.WsConnector; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; +import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.PARAM_BRANCH; import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.PARAM_PROJECT; public class ProjectBranchesServiceTest { @@ -51,4 +53,18 @@ public class ProjectBranchesServiceTest { .andNoOtherParam(); } + @Test + public void show() { + underTest.show("projectKey", "my_branch"); + + assertThat(serviceTester.getGetParser()).isSameAs(ShowWsResponse.parser()); + + GetRequest getRequest = serviceTester.getGetRequest(); + serviceTester.assertThat(getRequest) + .hasPath("show") + .hasParam(PARAM_PROJECT, "projectKey") + .hasParam(PARAM_BRANCH, "my_branch") + .andNoOtherParam(); + } + } |