Search in sources :

Example 6 with CoverageResult

use of hudson.plugins.cobertura.targets.CoverageResult in project phabricator-jenkins-plugin by uber.

the class CoberturaPluginCoverageProviderTest method conversion.

@Test
public void conversion() {
    CoverageResult result = getMockResult();
    CodeCoverageMetrics metrics = CoberturaPluginCoverageProvider.convertCobertura(result);
    assertEquals(75.0f, metrics.getLineCoveragePercent(), 0.0f);
    assertEquals(0.0f, metrics.getPackageCoveragePercent(), 0.0f);
}
Also used : CoverageResult(hudson.plugins.cobertura.targets.CoverageResult) Test(org.junit.Test)

Aggregations

CoverageResult (hudson.plugins.cobertura.targets.CoverageResult)6 Ratio (hudson.plugins.cobertura.Ratio)2 Test (org.junit.Test)2 AbstractBuild (hudson.model.AbstractBuild)1 CoberturaBuildAction (hudson.plugins.cobertura.CoberturaBuildAction)1 File (java.io.File)1 IOException (java.io.IOException)1 WithoutJenkins (org.jvnet.hudson.test.WithoutJenkins)1