Preprocessors.java

1
package pro.verron.officestamper.preset;
2
3
import org.docx4j.wml.ProofErr;
4
import pro.verron.officestamper.api.OfficeStamperException;
5
import pro.verron.officestamper.api.PreProcessor;
6
import pro.verron.officestamper.preset.preprocessors.malformedcomments.RemoveMalformedComments;
7
import pro.verron.officestamper.preset.preprocessors.prooferror.RemoveProofErrors;
8
import pro.verron.officestamper.preset.preprocessors.similarrun.MergeSameStyleRuns;
9
10
/**
11
 * A helper class that provides pre-processing functionality for WordprocessingMLPackage documents.
12
 */
13
public class Preprocessors {
14
15
    private Preprocessors() {
16
        throw new OfficeStamperException("Preprocessors cannot be instantiated");
17
    }
18
19
    /**
20
     * Returns a PreProcessor object that merges same style runs that are next to each other in a
21
     * WordprocessingMLPackage document.
22
     *
23
     * @return a PreProcessor object that merges similar runs.
24
     */
25
    public static PreProcessor mergeSimilarRuns() {
26 1 1. mergeSimilarRuns : replaced return value with null for pro/verron/officestamper/preset/Preprocessors::mergeSimilarRuns → KILLED
        return new MergeSameStyleRuns();
27
    }
28
29
    /**
30
     * Returns a PreProcessor object that removes all {@link ProofErr} elements from the WordprocessingMLPackage
31
     * document.
32
     *
33
     * @return a PreProcessor object that removes ProofErr elements.
34
     */
35
    public static PreProcessor removeLanguageProof() {
36 1 1. removeLanguageProof : replaced return value with null for pro/verron/officestamper/preset/Preprocessors::removeLanguageProof → KILLED
        return new RemoveProofErrors();
37
    }
38
39
    public static PreProcessor removeMalformedComments() {
40 1 1. removeMalformedComments : replaced return value with null for pro/verron/officestamper/preset/Preprocessors::removeMalformedComments → KILLED
        return new RemoveMalformedComments();
41
    }
42
}

Mutations

26

1.1
Location : mergeSimilarRuns
Killed by : pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[method:test64()]
replaced return value with null for pro/verron/officestamper/preset/Preprocessors::mergeSimilarRuns → KILLED

36

1.1
Location : removeLanguageProof
Killed by : pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[method:test64()]
replaced return value with null for pro/verron/officestamper/preset/Preprocessors::removeLanguageProof → KILLED

40

1.1
Location : removeMalformedComments
Killed by : pro.verron.officestamper.test.ResolutionTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ResolutionTest]/[test-template:testStaticResolution(java.lang.String, boolean, boolean, boolean, java.lang.String, java.lang.String)]/[test-template-invocation:#6]
replaced return value with null for pro/verron/officestamper/preset/Preprocessors::removeMalformedComments → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.1