From b0d4220a7e1b2c53dfd5b8da118a1829039ce44b Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Mon, 17 Oct 2016 16:31:39 +0200 Subject: SONAR-8284 Remove overall/IT coverage data from scanner report --- .../mediumtest/coverage/CoverageMediumTest.java | 22 ++++++++-------------- .../scanner/report/CoveragePublisherTest.java | 8 ++++---- 2 files changed, 12 insertions(+), 18 deletions(-) (limited to 'sonar-scanner-engine/src/test') 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> 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> 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> 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 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()); } -- cgit v1.2.3