use of org.sonarqube.ws.AlmSettings.GetBindingWsResponse in project sonarqube by SonarSource.
the class GetBindingActionTest method get_bitbucket_project_binding.
@Test
public void get_bitbucket_project_binding() {
userSession.logIn(user).addProjectPermission(ADMIN, project);
AlmSettingDto almSetting = db.almSettings().insertBitbucketAlmSetting();
ProjectAlmSettingDto projectAlmSettingDto = db.almSettings().insertBitbucketProjectAlmSetting(almSetting, project);
GetBindingWsResponse response = ws.newRequest().setParam("project", project.getKey()).executeProtobuf(GetBindingWsResponse.class);
assertThat(response.getAlm()).isEqualTo(AlmSettings.Alm.bitbucket);
assertThat(response.getKey()).isEqualTo(almSetting.getKey());
assertThat(response.getRepository()).isEqualTo(projectAlmSettingDto.getAlmRepo());
assertThat(response.getUrl()).isEqualTo(almSetting.getUrl());
assertThat(response.getSlug()).isEqualTo(projectAlmSettingDto.getAlmSlug());
assertThat(response.hasSummaryCommentEnabled()).isFalse();
}
Aggregations