Package com.spertus.jacquard.coverage
Class Scorer
java.lang.Object
com.spertus.jacquard.coverage.Scorer
- Direct Known Subclasses:
 LinearScorer
A way of converting branch coverage and line coverage information
 into a single score.
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final doubleThe maximum score that can be earned. - 
Constructor Summary
Constructors - 
Method Summary
 
- 
Field Details
- 
maxScore
protected final double maxScoreThe maximum score that can be earned. 
 - 
 - 
Constructor Details
- 
Scorer
protected Scorer(double maxScore) Creates a scorer.- Parameters:
 maxScore- the maximum possible score
 
 - 
 - 
Method Details
- 
score
public abstract double score(double branchCoverage, double lineCoverage) Converts branch coverage and line coverage ratios into a score.- Parameters:
 branchCoverage- the branch coverage ratio [0, 1]lineCoverage- the line coverage ratio [0, 1]- Returns:
 - a nonnegative score
 
 - 
getResult
Creates a result based on information generated by Jacoco.- Parameters:
 name- the name of the graderbranchCoverage- the branch coverage ratio [0, 1]lineCoverage- the line coverage ratio [0, 1]- Returns:
 - the result
 
 
 -