StandardPlaceholder.java

1
package pro.verron.officestamper.core;
2
3
import pro.verron.officestamper.api.Placeholder;
4
5
/**
6
 * Represents an expression with a configured Matcher.
7
 */
8
public record StandardPlaceholder(
9
        Matcher matcher,
10
        String expression
11
)
12
        implements Placeholder {
13
    /**
14
     * Returns the inner part of the expression
15
     * by stripping the prefix and suffix.
16
     *
17
     * @return the inner part of the expression.
18
     */
19
    @Override
20
    public String content() {
21 2 1. content : negated conditional → KILLED
2. content : replaced return value with "" for pro/verron/officestamper/core/StandardPlaceholder::content → KILLED
        return matcher.match(expression)
22
                ? matcher.strip(expression)
23
                : expression;
24
    }
25
}

Mutations

21

1.1
Location : content
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

2.2
Location : content
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/StandardPlaceholder::content → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.0