diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2016-10-17 16:31:39 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2016-10-18 16:00:26 +0200 |
commit | b0d4220a7e1b2c53dfd5b8da118a1829039ce44b (patch) | |
tree | fbdcc3cdfe974a260628011e8eb90ed2f363f2c5 /sonar-scanner-engine/src/test | |
parent | f21abcbb8250053703ce6edc36bfea03bb3665e7 (diff) | |
download | sonarqube-b0d4220a7e1b2c53dfd5b8da118a1829039ce44b.tar.gz sonarqube-b0d4220a7e1b2c53dfd5b8da118a1829039ce44b.zip |
SONAR-8284 Remove overall/IT coverage data from scanner report
Diffstat (limited to 'sonar-scanner-engine/src/test')
2 files changed, 12 insertions, 18 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/coverage/CoverageMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/coverage/CoverageMediumTest.java index ccc5440ae86..0f3c28a14f0 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/coverage/CoverageMediumTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/coverage/CoverageMediumTest.java @@ -83,12 +83,9 @@ public class CoverageMediumTest { .start(); InputFile file = result.inputFile("src/sample.xoo"); - assertThat(result.coverageFor(file, 2).getUtHits()).isTrue(); - assertThat(result.coverageFor(file, 2).getItHits()).isFalse(); + assertThat(result.coverageFor(file, 2).getHits()).isTrue(); assertThat(result.coverageFor(file, 2).getConditions()).isEqualTo(2); - assertThat(result.coverageFor(file, 2).getUtCoveredConditions()).isEqualTo(1); - assertThat(result.coverageFor(file, 2).getItCoveredConditions()).isEqualTo(0); - assertThat(result.coverageFor(file, 2).getOverallCoveredConditions()).isEqualTo(0); + assertThat(result.coverageFor(file, 2).getCoveredConditions()).isEqualTo(1); Map<String, List<org.sonar.scanner.protocol.output.ScannerReport.Measure>> allMeasures = result.allMeasures(); assertThat(allMeasures.get("com.foo.project:src/sample.xoo")).extracting("metricKey", "intValue.value") @@ -125,10 +122,10 @@ public class CoverageMediumTest { .start(); InputFile file = result.inputFile("src/sample.xoo"); - assertThat(result.coverageFor(file, 2).getUtHits()).isTrue(); + assertThat(result.coverageFor(file, 2).getHits()).isTrue(); assertThat(result.coverageFor(file, 2).getConditions()).isEqualTo(2); - assertThat(result.coverageFor(file, 2).getUtCoveredConditions()).isEqualTo(2); - assertThat(result.coverageFor(file, 3).getUtHits()).isTrue(); + assertThat(result.coverageFor(file, 2).getCoveredConditions()).isEqualTo(2); + assertThat(result.coverageFor(file, 3).getHits()).isTrue(); Map<String, List<org.sonar.scanner.protocol.output.ScannerReport.Measure>> allMeasures = result.allMeasures(); assertThat(allMeasures.get("com.foo.project:src/sample.xoo")).extracting("metricKey", "intValue.value") @@ -199,14 +196,11 @@ public class CoverageMediumTest { InputFile file = result.inputFile("src/sample.xoo"); assertThat(result.coverageFor(file, 1)).isNull(); - assertThat(result.coverageFor(file, 2).getUtHits()).isFalse(); - assertThat(result.coverageFor(file, 2).getItHits()).isFalse(); + assertThat(result.coverageFor(file, 2).getHits()).isFalse(); assertThat(result.coverageFor(file, 2).getConditions()).isEqualTo(0); - assertThat(result.coverageFor(file, 2).getUtCoveredConditions()).isEqualTo(0); - assertThat(result.coverageFor(file, 2).getItCoveredConditions()).isEqualTo(0); - assertThat(result.coverageFor(file, 2).getOverallCoveredConditions()).isEqualTo(0); + assertThat(result.coverageFor(file, 2).getCoveredConditions()).isEqualTo(0); - assertThat(result.coverageFor(file, 3).getUtHits()).isFalse(); + assertThat(result.coverageFor(file, 3).getHits()).isFalse(); assertThat(result.coverageFor(file, 4)).isNull(); Map<String, List<org.sonar.scanner.protocol.output.ScannerReport.Measure>> allMeasures = result.allMeasures(); diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/CoveragePublisherTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/CoveragePublisherTest.java index 6ce6b181fc9..95757460e10 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/CoveragePublisherTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/report/CoveragePublisherTest.java @@ -84,17 +84,17 @@ public class CoveragePublisherTest { try (CloseableIterator<LineCoverage> it = new ScannerReportReader(outputDir).readComponentCoverage(2)) { assertThat(it.next()).isEqualTo(LineCoverage.newBuilder() .setLine(2) - .setUtHits(true) + .setHits(true) .build()); assertThat(it.next()).isEqualTo(LineCoverage.newBuilder() .setLine(3) - .setUtHits(true) + .setHits(true) .setConditions(4) - .setUtCoveredConditions(2) + .setCoveredConditions(2) .build()); assertThat(it.next()).isEqualTo(LineCoverage.newBuilder() .setLine(5) - .setUtHits(false) + .setHits(false) .build()); } |