Class LinearBranchScorer


public class LinearBranchScorer extends LinearScorer
A linear scorer that considers only branch coverage, not line coverage. For example, if LinearScorer.score(double, double) is called on a linear branch scorer with max points of 100 and branch coverage of .85, the score 85 would be returned, regardless of the line coverage percent.
  • Constructor Details

    • LinearBranchScorer

      public LinearBranchScorer(double maxPoints)
      Creates a linear scorer that considers only branch coverage, not line coverage.
      Parameters:
      maxPoints - the maximum number of points
  • Method Details

    • getMessage

      protected String getMessage(double branchCoverage, double lineCoverage)
      Description copied from class: LinearScorer
      Gets a message summarizing information about the coverage being tested.
      Overrides:
      getMessage in class LinearScorer
      Parameters:
      branchCoverage - the branch coverage ratio [0, 1]
      lineCoverage - the line coverage ratio [0, 1]
      Returns:
      a message