net.sourceforge.cobertura.reporting.CoverageThresholdsReport Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cobertura Show documentation
Show all versions of cobertura Show documentation
Cobertura is a free Java tool that calculates the percentage of
code accessed by tests. It can be used to identify which parts of
your Java program are lacking test coverage. It is based on jcoverage.
The newest version!
package net.sourceforge.cobertura.reporting;
import net.sourceforge.cobertura.check.CoverageResultEntry;
import net.sourceforge.cobertura.dsl.ReportFormat;
import java.util.Collections;
import java.util.List;
/**
* Contains coverage data.
*/
public class CoverageThresholdsReport implements Report {
private List coverageResultEntries;
private NullReport nullReport;
public CoverageThresholdsReport(
List coverageResultEntries) {
this.coverageResultEntries = Collections
.unmodifiableList(coverageResultEntries);
this.nullReport = new NullReport();
}
public void export(ReportFormat reportFormat) {
//TODO left for future implementations
}
public ReportName getName() {
return ReportName.THRESHOLDS_REPORT;
}
public Report getByName(ReportName name) {
if (getName().equals(name)) {
return this;
}
return nullReport;
}
public List getCoverageResultEntries() {
return coverageResultEntries;
}
}