RunUtil.java

1
package pro.verron.officestamper.core;
2
3
import jakarta.xml.bind.JAXBElement;
4
import org.docx4j.dml.wordprocessingDrawing.Inline;
5
import org.docx4j.jaxb.Context;
6
import org.docx4j.model.styles.StyleUtil;
7
import org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage;
8
import org.docx4j.wml.*;
9
import org.slf4j.Logger;
10
import org.slf4j.LoggerFactory;
11
import org.springframework.lang.Nullable;
12
import pro.verron.officestamper.api.OfficeStamperException;
13
14
import java.util.Objects;
15
import java.util.Random;
16
17
import static java.util.stream.Collectors.joining;
18
19
/**
20
 * Utility class to handle runs.
21
 *
22
 * @author Joseph Verron
23
 * @author Tom Hombergs
24
 * @version ${version}
25
 * @since 1.0.0
26
 */
27
public class RunUtil {
28
    private static final Random random = new Random();
29
30
    private static final String PRESERVE = "preserve";
31
    private static final ObjectFactory factory = Context.getWmlObjectFactory();
32
    private static final Logger log = LoggerFactory.getLogger(RunUtil.class);
33
34
    private RunUtil() {
35
        throw new OfficeStamperException("Utility class shouldn't be instantiated");
36
    }
37
38
    /**
39
     * Returns the text string of a run.
40
     *
41
     * @param run the run whose text to get.
42
     *
43
     * @return {@link String} representation of the run.
44
     */
45
    public static String getText(R run) {
46 1 1. getText : replaced return value with "" for pro/verron/officestamper/core/RunUtil::getText → KILLED
        return run.getContent()
47
                  .stream()
48
                  .map(RunUtil::getText)
49
                  .collect(joining());
50
    }
51
52
    /**
53
     * Returns the textual representation of a run child
54
     *
55
     * @param content the run child to represent textually
56
     *
57
     * @return {@link String} representation of run child
58
     */
59
    public static CharSequence getText(Object content) {
60 2 1. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED
2. getText : negated conditional → KILLED
        if (content instanceof JAXBElement<?> jaxbElement) return getText(jaxbElement.getValue());
61 2 1. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED
2. getText : negated conditional → KILLED
        if (content instanceof Text text) return getText(text);
62 2 1. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED
2. getText : negated conditional → KILLED
        if (content instanceof R.Tab) return "\t";
63 2 1. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → NO_COVERAGE
2. getText : negated conditional → SURVIVED
        if (content instanceof R.Cr) return "\n";
64 3 1. getText : negated conditional → KILLED
2. getText : negated conditional → KILLED
3. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED
        if (content instanceof Br br && br.getType() == null) return "\n";
65 3 1. getText : negated conditional → SURVIVED
2. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → SURVIVED
3. getText : negated conditional → KILLED
        if (content instanceof Br br && br.getType() == STBrType.TEXT_WRAPPING) return "\n";
66 3 1. getText : negated conditional → SURVIVED
2. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → SURVIVED
3. getText : negated conditional → KILLED
        if (content instanceof Br br && br.getType() == STBrType.PAGE) return "\n";
67 3 1. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → NO_COVERAGE
2. getText : negated conditional → NO_COVERAGE
3. getText : negated conditional → KILLED
        if (content instanceof Br br && br.getType() == STBrType.COLUMN) return "\n";
68 2 1. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → NO_COVERAGE
2. getText : negated conditional → KILLED
        if (content instanceof R.NoBreakHyphen) return "‑";
69 2 1. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → NO_COVERAGE
2. getText : negated conditional → KILLED
        if (content instanceof R.SoftHyphen) return "\u00AD";
70 2 1. getText : negated conditional → SURVIVED
2. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED
        if (content instanceof R.LastRenderedPageBreak) return "";
71 2 1. getText : negated conditional → SURVIVED
2. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED
        if (content instanceof R.AnnotationRef) return "";
72 2 1. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → SURVIVED
2. getText : negated conditional → SURVIVED
        if (content instanceof R.CommentReference) return "";
73 2 1. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → SURVIVED
2. getText : negated conditional → SURVIVED
        if (content instanceof Drawing) return "";
74 2 1. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → NO_COVERAGE
2. getText : negated conditional → KILLED
        if (content instanceof R.Sym sym) return "<sym(" + sym.getFont() + ", " + sym.getChar() + ")>";
75
76
        log.debug("Unhandled object type: {}", content.getClass());
77 1 1. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → SURVIVED
        return "";
78
    }
79
80
    private static CharSequence getText(Text text) {
81
        String value = text.getValue();
82
        String space = text.getSpace();
83 2 1. getText : negated conditional → KILLED
2. getText : replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED
        return Objects.equals(space, PRESERVE)
84
                ? value // keeps spaces if spaces are to be preserved (LibreOffice seems to ignore the "space" property)
85
                : value.trim(); // trimming value if spaces are not to be preserved (simulates behavior of Word;)
86
    }
87
88
    /**
89
     * Creates a new run with the specified text and inherits the style of the parent paragraph.
90
     *
91
     * @param text the initial text of the run.
92
     *
93
     * @return the newly created run.
94
     */
95
    public static R create(String text, PPr paragraphPr) {
96
        R run = create(text);
97 1 1. create : removed call to pro/verron/officestamper/core/RunUtil::applyParagraphStyle → SURVIVED
        applyParagraphStyle(run, paragraphPr);
98 1 1. create : replaced return value with null for pro/verron/officestamper/core/RunUtil::create → KILLED
        return run;
99
    }
100
101
    /**
102
     * Creates a new run with the specified text.
103
     *
104
     * @param text the initial text of the run.
105
     *
106
     * @return the newly created run.
107
     */
108
    public static R create(String text) {
109
        R run = factory.createR();
110 1 1. create : removed call to pro/verron/officestamper/core/RunUtil::setText → KILLED
        setText(run, text);
111 1 1. create : replaced return value with null for pro/verron/officestamper/core/RunUtil::create → KILLED
        return run;
112
    }
113
114
    /**
115
     * Applies the style of the given paragraph to the given content object (if the content object is a Run).
116
     *
117
     * @param run the Run to which the style should be applied.
118
     */
119
    public static void applyParagraphStyle(R run, @Nullable PPr paragraphPr) {
120 1 1. applyParagraphStyle : negated conditional → KILLED
        if (paragraphPr == null) return;
121
        var runPr = paragraphPr.getRPr();
122 1 1. applyParagraphStyle : negated conditional → SURVIVED
        if (runPr == null) return;
123
        RPr runProperties = new RPr();
124
        StyleUtil.apply(runPr, runProperties);
125 1 1. applyParagraphStyle : removed call to org/docx4j/wml/R::setRPr → SURVIVED
        run.setRPr(runProperties);
126
    }
127
128
    /**
129
     * Sets the text of the given run to the given value.
130
     *
131
     * @param run  the run whose text to change.
132
     * @param text the text to set.
133
     */
134
    public static void setText(R run, String text) {
135
        run.getContent()
136 1 1. setText : removed call to java/util/List::clear → KILLED
           .clear();
137
        Text textObj = createText(text);
138
        run.getContent()
139
           .add(textObj);
140
    }
141
142
    /**
143
     * Creates a text object with the given text.
144
     *
145
     * @param text the text to set.
146
     *
147
     * @return the newly created text object.
148
     */
149
    public static Text createText(String text) {
150
        Text textObj = factory.createText();
151 1 1. createText : removed call to org/docx4j/wml/Text::setValue → KILLED
        textObj.setValue(text);
152 1 1. createText : removed call to org/docx4j/wml/Text::setSpace → KILLED
        textObj.setSpace(PRESERVE); // make the text preserve spaces
153 1 1. createText : replaced return value with null for pro/verron/officestamper/core/RunUtil::createText → KILLED
        return textObj;
154
    }
155
156
157
    /**
158
     * Creates a run containing the given image.
159
     *
160
     * @param maxWidth      max width of the image
161
     * @param abstractImage the image
162
     *
163
     * @return the run containing the image
164
     */
165
    public static R createRunWithImage(
166
            @Nullable Integer maxWidth,
167
            BinaryPartAbstractImage abstractImage
168
    ) {
169
        // creating random ids assuming they are unique,
170
        // id must not be too large;
171
        // otherwise Word cannot open the document
172
        int id1 = random.nextInt(100000);
173
        int id2 = random.nextInt(100000);
174
        var filenameHint = "dummyFileName";
175
        var altText = "dummyAltText";
176
177
        Inline inline = tryCreateImageInline(
178
                filenameHint,
179
                altText,
180
                maxWidth,
181
                abstractImage,
182
                id1,
183
                id2);
184
185
186
        // Now add the inline in w:p/w:r/w:drawing
187
        ObjectFactory factory = new ObjectFactory();
188
        R run = factory.createR();
189
        Drawing drawing = factory.createDrawing();
190
        run.getContent()
191
           .add(drawing);
192
        drawing.getAnchorOrInline()
193
               .add(inline);
194
195 1 1. createRunWithImage : replaced return value with null for pro/verron/officestamper/core/RunUtil::createRunWithImage → KILLED
        return run;
196
197
    }
198
199
    private static Inline tryCreateImageInline(
200
            String filenameHint,
201
            String altText,
202
            @Nullable Integer maxWidth,
203
            BinaryPartAbstractImage abstractImage,
204
            int id1,
205
            int id2
206
    ) {
207
        try {
208 2 1. tryCreateImageInline : negated conditional → KILLED
2. tryCreateImageInline : replaced return value with null for pro/verron/officestamper/core/RunUtil::tryCreateImageInline → KILLED
            return maxWidth == null
209
                    ? abstractImage.createImageInline(filenameHint, altText, id1, id2, false)
210
                    : abstractImage.createImageInline(filenameHint, altText, id1, id2, false, maxWidth);
211
        } catch (Exception e) {
212
            throw new OfficeStamperException(e);
213
        }
214
    }
215
216
    static int getLength(R run) {
217 1 1. getLength : replaced int return with 0 for pro/verron/officestamper/core/RunUtil::getLength → KILLED
        return getText(run)
218
                .length();
219
    }
220
221
    static String getSubstring(R run, int beginIndex) {
222 1 1. getSubstring : replaced return value with "" for pro/verron/officestamper/core/RunUtil::getSubstring → KILLED
        return getText(run)
223
                .substring(beginIndex);
224
    }
225
226
    static String getSubstring(R run, int beginIndex, int endIndex) {
227 1 1. getSubstring : replaced return value with "" for pro/verron/officestamper/core/RunUtil::getSubstring → KILLED
        return getText(run)
228
                .substring(beginIndex, endIndex);
229
    }
230
}

Mutations

46

1.1
Location : getText
Killed by : pro.verron.officestamper.test.ResolutionTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ResolutionTest]/[test-template:testCustomResolution(java.lang.String, boolean, boolean, boolean, boolean, boolean, java.lang.String, boolean, java.lang.String)]/[test-template-invocation:#17]
replaced return value with "" for pro/verron/officestamper/core/RunUtil::getText → KILLED

60

1.1
Location : getText
Killed by : pro.verron.officestamper.test.ResolutionTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ResolutionTest]/[test-template:testCustomResolution(java.lang.String, boolean, boolean, boolean, boolean, boolean, java.lang.String, boolean, java.lang.String)]/[test-template-invocation:#17]
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED

2.2
Location : getText
Killed by : pro.verron.officestamper.test.ResolutionTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ResolutionTest]/[test-template:testCustomResolution(java.lang.String, boolean, boolean, boolean, boolean, boolean, java.lang.String, boolean, java.lang.String)]/[test-template-invocation:#17]
negated conditional → KILLED

61

1.1
Location : getText
Killed by : pro.verron.officestamper.test.ResolutionTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ResolutionTest]/[test-template:testCustomResolution(java.lang.String, boolean, boolean, boolean, boolean, boolean, java.lang.String, boolean, java.lang.String)]/[test-template-invocation:#17]
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED

2.2
Location : getText
Killed by : pro.verron.officestamper.test.ResolutionTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ResolutionTest]/[test-template:testCustomResolution(java.lang.String, boolean, boolean, boolean, boolean, boolean, java.lang.String, boolean, java.lang.String)]/[test-template-invocation:#17]
negated conditional → KILLED

62

1.1
Location : getText
Killed by : pro.verron.officestamper.test.WhitespaceTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.WhitespaceTest]/[method:should_preserve_tabulations()]
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED

2.2
Location : getText
Killed by : pro.verron.officestamper.test.WhitespaceTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.WhitespaceTest]/[method:should_preserve_tabulations()]
negated conditional → KILLED

63

1.1
Location : getText
Killed by : none
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → NO_COVERAGE

2.2
Location : getText
Killed by : none
negated conditional → SURVIVED
Covering tests

64

1.1
Location : getText
Killed by : pro.verron.officestamper.test.CustomFunctionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomFunctionTests]/[method:features()]
negated conditional → KILLED

2.2
Location : getText
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

3.3
Location : getText
Killed by : pro.verron.officestamper.test.CustomFunctionTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.CustomFunctionTests]/[method:features()]
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED

65

1.1
Location : getText
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

2.2
Location : getText
Killed by : none
negated conditional → SURVIVED
Covering tests

3.3
Location : getText
Killed by : none
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → SURVIVED Covering tests

66

1.1
Location : getText
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

2.2
Location : getText
Killed by : none
negated conditional → SURVIVED
Covering tests

3.3
Location : getText
Killed by : none
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → SURVIVED Covering tests

67

1.1
Location : getText
Killed by : none
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → NO_COVERAGE

2.2
Location : getText
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

3.3
Location : getText
Killed by : none
negated conditional → NO_COVERAGE

68

1.1
Location : getText
Killed by : none
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → NO_COVERAGE

2.2
Location : getText
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

69

1.1
Location : getText
Killed by : none
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → NO_COVERAGE

2.2
Location : getText
Killed by : pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.FailOnUnresolvedPlaceholderTest]/[method:fails()]
negated conditional → KILLED

70

1.1
Location : getText
Killed by : pro.verron.officestamper.test.MultiSectionTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.MultiSectionTest]/[method:expressionsInMultipleSections()]
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED

2.2
Location : getText
Killed by : none
negated conditional → SURVIVED
Covering tests

71

1.1
Location : getText
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#38]
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED

2.2
Location : getText
Killed by : none
negated conditional → SURVIVED
Covering tests

72

1.1
Location : getText
Killed by : none
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → SURVIVED
Covering tests

2.2
Location : getText
Killed by : none
negated conditional → SURVIVED Covering tests

73

1.1
Location : getText
Killed by : none
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → SURVIVED
Covering tests

2.2
Location : getText
Killed by : none
negated conditional → SURVIVED Covering tests

74

1.1
Location : getText
Killed by : pro.verron.officestamper.test.PlaceholderReplacementInTextBoxesTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.PlaceholderReplacementInTextBoxesTest]/[method:expressionReplacementInTextBoxesTest()]
negated conditional → KILLED

2.2
Location : getText
Killed by : none
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → NO_COVERAGE

77

1.1
Location : getText
Killed by : none
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → SURVIVED
Covering tests

83

1.1
Location : getText
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#39]
negated conditional → KILLED

2.2
Location : getText
Killed by : pro.verron.officestamper.test.ResolutionTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ResolutionTest]/[test-template:testCustomResolution(java.lang.String, boolean, boolean, boolean, boolean, boolean, java.lang.String, boolean, java.lang.String)]/[test-template-invocation:#17]
replaced return value with null for pro/verron/officestamper/core/RunUtil::getText → KILLED

97

1.1
Location : create
Killed by : none
removed call to pro/verron/officestamper/core/RunUtil::applyParagraphStyle → SURVIVED
Covering tests

98

1.1
Location : create
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#25]
replaced return value with null for pro/verron/officestamper/core/RunUtil::create → KILLED

110

1.1
Location : create
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#25]
removed call to pro/verron/officestamper/core/RunUtil::setText → KILLED

111

1.1
Location : create
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#25]
replaced return value with null for pro/verron/officestamper/core/RunUtil::create → KILLED

120

1.1
Location : applyParagraphStyle
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#25]
negated conditional → KILLED

122

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

125

1.1
Location : applyParagraphStyle
Killed by : none
removed call to org/docx4j/wml/R::setRPr → SURVIVED
Covering tests

136

1.1
Location : setText
Killed by : pro.verron.officestamper.test.ResolutionTest.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.ResolutionTest]/[test-template:testCustomResolution(java.lang.String, boolean, boolean, boolean, boolean, boolean, java.lang.String, boolean, java.lang.String)]/[test-template-invocation:#9]
removed call to java/util/List::clear → KILLED

151

1.1
Location : createText
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#25]
removed call to org/docx4j/wml/Text::setValue → KILLED

152

1.1
Location : createText
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#6]
removed call to org/docx4j/wml/Text::setSpace → KILLED

153

1.1
Location : createText
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#25]
replaced return value with null for pro/verron/officestamper/core/RunUtil::createText → KILLED

195

1.1
Location : createRunWithImage
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#32]
replaced return value with null for pro/verron/officestamper/core/RunUtil::createRunWithImage → KILLED

208

1.1
Location : tryCreateImageInline
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#32]
negated conditional → KILLED

2.2
Location : tryCreateImageInline
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#32]
replaced return value with null for pro/verron/officestamper/core/RunUtil::tryCreateImageInline → KILLED

217

1.1
Location : getLength
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#25]
replaced int return with 0 for pro/verron/officestamper/core/RunUtil::getLength → KILLED

222

1.1
Location : getSubstring
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#16]
replaced return value with "" for pro/verron/officestamper/core/RunUtil::getSubstring → KILLED

227

1.1
Location : getSubstring
Killed by : pro.verron.officestamper.test.DefaultTests.[engine:junit-jupiter]/[class:pro.verron.officestamper.test.DefaultTests]/[test-template:features(java.lang.String, pro.verron.officestamper.api.OfficeStamperConfiguration, java.lang.Object, java.io.InputStream, java.lang.String)]/[test-template-invocation:#37]
replaced return value with "" for pro/verron/officestamper/core/RunUtil::getSubstring → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.0