action.createParam(PARAM_QUALITY_PROFILE)
.setDescription("Quality profile name to export. If left empty, the default profile for the language is exported. If this parameter is set, '%s' must not be set.",
PARAM_KEY)
- .setDeprecatedKey("profileName", "6.6")
+ .setDeprecatedKey("name", "6.6")
.setExampleValue("My Sonar way");
action.createParam(PARAM_LANGUAGE)
import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_LANGUAGE;
import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_KEY;
+import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_LANGUAGE;
public class ExportActionTest {
assertThat(definition.isPost()).isFalse();
assertThat(definition.isInternal()).isFalse();
assertThat(definition.params()).extracting(WebService.Param::key).containsExactlyInAnyOrder("key", "language", "qualityProfile", "organization");
+
WebService.Param organizationParam = definition.param("organization");
assertThat(organizationParam.since()).isEqualTo("6.4");
assertThat(organizationParam.isInternal()).isTrue();
+
WebService.Param key = definition.param("key");
assertThat(key.since()).isEqualTo("6.5");
assertThat(key.deprecatedSince()).isEqualTo("6.6");
+
WebService.Param name = definition.param("qualityProfile");
assertThat(name.deprecatedSince()).isNullOrEmpty();
+ assertThat(name.deprecatedKey()).isEqualTo("name");
+
WebService.Param language = definition.param("language");
assertThat(language.deprecatedSince()).isNullOrEmpty();
}