OfficeStamperConfigurations.java

1
package pro.verron.officestamper.preset;
2
3
import pro.verron.officestamper.api.OfficeStamperConfiguration;
4
import pro.verron.officestamper.api.OfficeStamperException;
5
import pro.verron.officestamper.core.DocxStamperConfiguration;
6
7
8
/**
9
 * The OfficeStamperConfigurations class provides static methods
10
 * to create different configurations for the OfficeStamper.
11
 */
12
public class OfficeStamperConfigurations {
13
14
15
    private OfficeStamperConfigurations() {
16
        throw new OfficeStamperException("OfficeStamperConfigurations cannot be instantiated");
17
    }
18
19
    /**
20
     * Creates a new OfficeStamperConfiguration with the standard configuration and additional preprocessors.
21
     *
22
     * @return the OfficeStamperConfiguration
23
     *
24
     * @see OfficeStamperConfiguration
25
     */
26
    public static OfficeStamperConfiguration standardWithPreprocessing() {
27
        var configuration = standard();
28 1 1. standardWithPreprocessing : removed call to pro/verron/officestamper/api/OfficeStamperConfiguration::addPreprocessor → SURVIVED
        configuration.addPreprocessor(Preprocessors.removeLanguageProof());
29 1 1. standardWithPreprocessing : removed call to pro/verron/officestamper/api/OfficeStamperConfiguration::addPreprocessor → SURVIVED
        configuration.addPreprocessor(Preprocessors.mergeSimilarRuns());
30 1 1. standardWithPreprocessing : replaced return value with null for pro/verron/officestamper/preset/OfficeStamperConfigurations::standardWithPreprocessing → KILLED
        return configuration;
31
    }
32
33
    /**
34
     * Creates a new standard OfficeStamperConfiguration.
35
     *
36
     * @return the standard OfficeStamperConfiguration
37
     */
38
    public static OfficeStamperConfiguration standard() {
39
        var configuration = new DocxStamperConfiguration();
40
        configuration.exposeInterfaceToExpressionLanguage(IStamperDateFormatter.class, new StamperDateFormatter());
41 1 1. standard : replaced return value with null for pro/verron/officestamper/preset/OfficeStamperConfigurations::standard → KILLED
        return configuration;
42
    }
43
44
    /**
45
     * Creates a new standard OfficeStamperConfiguration.
46
     *
47
     * @return the standard OfficeStamperConfiguration
48
     */
49
    public static OfficeStamperConfiguration raw() {
50
        var configuration = new DocxStamperConfiguration();
51 1 1. raw : removed call to pro/verron/officestamper/core/DocxStamperConfiguration::resetResolvers → KILLED
        configuration.resetResolvers();
52
        configuration.setEvaluationContextConfigurer(EvaluationContextConfigurers.defaultConfigurer());
53 1 1. raw : removed call to pro/verron/officestamper/core/DocxStamperConfiguration::resetCommentProcessors → SURVIVED
        configuration.resetCommentProcessors();
54 1 1. raw : replaced return value with null for pro/verron/officestamper/preset/OfficeStamperConfigurations::raw → KILLED
        return configuration;
55
    }
56
57
}

Mutations

28

1.1
Location : standardWithPreprocessing
Killed by : none
removed call to pro/verron/officestamper/api/OfficeStamperConfiguration::addPreprocessor → SURVIVED
Covering tests

29

1.1
Location : standardWithPreprocessing
Killed by : none
removed call to pro/verron/officestamper/api/OfficeStamperConfiguration::addPreprocessor → SURVIVED
Covering tests

30

1.1
Location : standardWithPreprocessing
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/OfficeStamperConfigurations::standardWithPreprocessing → KILLED

41

1.1
Location : standard
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:#8]
replaced return value with null for pro/verron/officestamper/preset/OfficeStamperConfigurations::standard → KILLED

51

1.1
Location : raw
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:#21]
removed call to pro/verron/officestamper/core/DocxStamperConfiguration::resetResolvers → KILLED

53

1.1
Location : raw
Killed by : none
removed call to pro/verron/officestamper/core/DocxStamperConfiguration::resetCommentProcessors → SURVIVED
Covering tests

54

1.1
Location : raw
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:#21]
replaced return value with null for pro/verron/officestamper/preset/OfficeStamperConfigurations::raw → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.0