All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.cobertura.reporting.CoverageThresholdsReport Maven / Gradle / Ivy

Go to download

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;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy