use of org.sonarqube.ws.Measures.ComponentWsResponse in project sonarqube by SonarSource.
the class ComponentActionTest method reference_key_in_the_response.
@Test
public void reference_key_in_the_response() {
userSession.logIn().setRoot();
ComponentDto project = db.components().insertPrivateProject();
ComponentDto view = db.components().insertPrivatePortfolio();
db.components().insertSnapshot(view);
ComponentDto projectCopy = db.components().insertComponent(newProjectCopy("project-uuid-copy", project, view));
MetricDto metric = db.measures().insertMetric(m -> m.setValueType("INT"));
ComponentWsResponse response = newRequest(projectCopy.getKey(), metric.getKey());
assertThat(response.getComponent().getRefKey()).isEqualTo(project.getKey());
}
Aggregations