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

org.pitest.coverage.CoverageSummary Maven / Gradle / Ivy

There is a newer version: 1.17.1
Show newest version
package org.pitest.coverage;

import static org.pitest.util.PercentageCalculator.getPercentage;

/**
 * Basic summary of line coverage data
 */
public final class CoverageSummary {

  private final int numberOfLines;
  private final int numberOfCoveredLines;

  public CoverageSummary(final int numberOfLines, final int numberOfCoveredLines) {
    this.numberOfLines = numberOfLines;
    this.numberOfCoveredLines = numberOfCoveredLines;
  }

  public int getNumberOfLines() {
    return this.numberOfLines;
  }

  public int getNumberOfCoveredLines() {
    return this.numberOfCoveredLines;
  }

  public int getCoverage() {
    return getPercentage(numberOfLines, numberOfCoveredLines);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy