diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-02-25 11:44:52 +0100 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-02-25 11:44:52 +0100 |
commit | 70961f0058aaf7eddf739cba89d19f0b86ad5c85 (patch) | |
tree | 81f80d26ecd778d61f72306243170e14b168bfe1 /plugins | |
parent | 5633520d8220bd9635fc8c0ef5939170442d7db4 (diff) | |
download | sonarqube-70961f0058aaf7eddf739cba89d19f0b86ad5c85.tar.gz sonarqube-70961f0058aaf7eddf739cba89d19f0b86ad5c85.zip |
API: fix CoverageMeasuresBuilder for Cobertura
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaSensorTest.java | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaSensorTest.java b/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaSensorTest.java index 8b5c57f7e3f..c14f11e160a 100644 --- a/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaSensorTest.java +++ b/plugins/sonar-cobertura-plugin/src/test/java/org/sonar/plugins/cobertura/CoberturaSensorTest.java @@ -62,7 +62,6 @@ public class CoberturaSensorTest { new CoberturaSensor().parseReport(getCoverageReport(), context); verify(context, never()).saveMeasure(eq(CoreMetrics.BRANCH_COVERAGE), anyDouble()); - verify(context, never()).saveMeasure(argThat(new IsMeasure(CoreMetrics.BRANCH_COVERAGE_HITS_DATA))); } @Test @@ -201,25 +200,6 @@ public class CoberturaSensorTest { "48=117;56=234;66=0;67=0;68=0;84=999;86=999;98=318;111=18;121=0;122=0;125=0;126=0;127=0;128=0;131=0;133=0"))); } - @Test - public void collectFileBranchHitsData() throws URISyntaxException { - SensorContext context = mock(SensorContext.class); - when(context.getResource(any(Resource.class))).thenReturn(new JavaFile("org.sonar.MyClass")); - new CoberturaSensor().parseReport(getCoverageReport(), context); - - // no conditions - verify(context, never()).saveMeasure( - eq(new JavaFile("org.apache.commons.chain.config.ConfigRuleSet")), - argThat(new IsMeasure(CoreMetrics.BRANCH_COVERAGE_HITS_DATA))); - - verify(context).saveMeasure( - eq(new JavaFile("org.apache.commons.chain.config.ConfigParser")), - argThat(new IsMeasure(CoreMetrics.BRANCH_COVERAGE_HITS_DATA, "73=50%;76=50%;93=100%"))); - - verify(context).saveMeasure( - eq(new JavaFile("org.apache.commons.chain.generic.CopyCommand")), - argThat(new IsMeasure(CoreMetrics.BRANCH_COVERAGE_HITS_DATA, "132=0%;136=0%"))); - } private File getCoverageReport() throws URISyntaxException { return new File(getClass().getResource("/org/sonar/plugins/cobertura/CoberturaSensorTest/commons-chain-coverage.xml").toURI()); |