import org.sonar.db.DbTester;
import org.sonar.db.component.ComponentDto;
import org.sonar.db.component.ResourceTypesRule;
-import org.sonar.db.component.SnapshotTesting;
import org.sonar.db.project.ProjectDto;
import org.sonar.server.component.ComponentFinder;
import org.sonar.server.exceptions.BadRequestException;
@Test
public void fails_with_BRE_if_both_params_are_provided() {
+ String projectUuid = project.getUuid();
+ String projectKey = project.getKey();
assertThatThrownBy(() -> {
underTest.newRequest()
- .setParam(ID_PARAM, project.getUuid()).setParam(KEY_PARAM, project.getKey())
+ .setParam(ID_PARAM, projectUuid).setParam(KEY_PARAM, projectKey)
.execute();
})
.isInstanceOf(BadRequestException.class)
import org.sonar.db.newcodeperiod.NewCodePeriodDto;
import org.sonar.db.newcodeperiod.NewCodePeriodParser;
import org.sonar.db.newcodeperiod.NewCodePeriodType;
-import org.sonar.server.component.ComponentCreationData;
import static org.sonar.db.newcodeperiod.NewCodePeriodType.NUMBER_OF_DAYS;
import static org.sonar.db.newcodeperiod.NewCodePeriodType.PREVIOUS_VERSION;