org.pitest.coverage.CoverageResult Maven / Gradle / Ivy
package org.pitest.coverage;
import java.util.Collection;
import org.pitest.testapi.Description;
public class CoverageResult {
private final Description testUnitDescription;
private final int executionTime;
private final Collection visitedBlocks;
private final boolean greenSuite;
public CoverageResult(final Description testUnitDescription,
final int executionTime, final boolean greenSuite,
final Collection visitedBlocks) {
this.testUnitDescription = testUnitDescription;
this.executionTime = executionTime;
this.visitedBlocks = visitedBlocks;
this.greenSuite = greenSuite;
}
public Description getTestUnitDescription() {
return this.testUnitDescription;
}
public int getExecutionTime() {
return this.executionTime;
}
public Collection getCoverage() {
return this.visitedBlocks;
}
public boolean isGreenTest() {
return this.greenSuite;
}
public int getNumberOfCoveredBlocks() {
return this.visitedBlocks.size();
}
@Override
public String toString() {
return "CoverageResult [testUnitDescription=" + this.testUnitDescription
+ ", executionTime=" + this.executionTime + ", coverage="
+ this.visitedBlocks + ", greenSuite=" + this.greenSuite + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy