PprLangVisitor.java

1
package pro.verron.officestamper.preset.preprocessors.rmlang;
2
3
import org.docx4j.utils.TraversalUtilVisitor;
4
import org.docx4j.wml.P;
5
import org.docx4j.wml.ParaRPr;
6
7
import java.util.ArrayList;
8
import java.util.List;
9
10
public class PprLangVisitor
11
        extends TraversalUtilVisitor<P> {
12
    private final List<ParaRPr> paraRPrs = new ArrayList<>();
13
14
    @Override
15
    public void apply(P element, Object parent1, List<Object> siblings) {
16
        var elementPPr = element.getPPr();
17 1 1. apply : negated conditional → KILLED
        if (elementPPr == null) return;
18
        var elementRPr = elementPPr.getRPr();
19 1 1. apply : negated conditional → KILLED
        if (elementRPr == null) return;
20
        var elementLang = elementRPr.getLang();
21 1 1. apply : negated conditional → SURVIVED
        if (elementLang == null) return;
22
        paraRPrs.add(elementRPr);
23
    }
24
25
    public List<ParaRPr> getParaPrs() {
26 1 1. getParaPrs : replaced return value with Collections.emptyList for pro/verron/officestamper/preset/preprocessors/rmlang/PprLangVisitor::getParaPrs → SURVIVED
        return paraRPrs;
27
    }
28
}

Mutations

17

1.1
Location : apply
Killed by : pro.verron.officestamper.test.RegressionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.RegressionTests]/[test-template:test52(pro.verron.officestamper.test.RegressionTests$Conditions, java.lang.String)]/[test-template-invocation:#1]
negated conditional → KILLED

19

1.1
Location : apply
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, org.docx4j.openpackaging.packages.WordprocessingMLPackage, java.lang.String)]/[test-template-invocation:#27]
negated conditional → KILLED

21

1.1
Location : apply
Killed by : none
negated conditional → SURVIVED
Covering tests

26

1.1
Location : getParaPrs
Killed by : none
replaced return value with Collections.emptyList for pro/verron/officestamper/preset/preprocessors/rmlang/PprLangVisitor::getParaPrs → SURVIVED
Covering tests

Active mutators

Tests examined


Report generated by PIT 1.22.1