edu.hm.hafner.grading.MutationCoverageMarkdown Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autograding-model Show documentation
Show all versions of autograding-model Show documentation
This module autogrades Java projects based on a configurable set of metrics.
The newest version!
package edu.hm.hafner.grading;
import java.util.List;
/**
* Renders the mutation coverage results in Markdown.
*
* @author Tobias Effner
* @author Ullrich Hafner
*/
public class MutationCoverageMarkdown extends CoverageMarkdown {
private static final String PIT = "pit";
static final String TYPE = "Mutation Coverage Score";
/**
* Creates a new Markdown renderer for code coverage results.
*/
public MutationCoverageMarkdown() {
super(TYPE, "microscope", "Killed %", "Survived %");
}
@Override
protected List createScores(final AggregatedScore aggregation) {
return aggregation.getMutationCoverageScores();
}
@Override
protected String getIcon(final CoverageScore score) {
if (PIT.equals(score.getId())) {
return format("",
ICON_SIZE, ICON_SIZE);
}
else {
return super.getIcon(score);
}
}
}