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

edu.hm.hafner.grading.MutationCoverageMarkdown Maven / Gradle / Ivy

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("\"PIT\"",
                    ICON_SIZE, ICON_SIZE);
        }
        else {
            return super.getIcon(score);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy