use of org.sonarqube.ws.client.measures.ComponentRequest in project sonar-web by SonarSource.
the class HtmlTestSuite method getMeasure.
static Measures.Measure getMeasure(Orchestrator orchestrator, String componentKey, String metricKey) {
Measures.ComponentWsResponse response = newWsClient(orchestrator).measures().component(new ComponentRequest().setComponent(componentKey).setMetricKeys(singletonList(metricKey)));
List<Measures.Measure> measures = response.getComponent().getMeasuresList();
return measures.size() == 1 ? measures.get(0) : null;
}
Aggregations