OghamFreemarkerProperties.java

1
package fr.sii.ogham.spring.template;
2
3
import org.springframework.boot.context.properties.ConfigurationProperties;
4
import org.springframework.boot.context.properties.NestedConfigurationProperty;
5
6
@ConfigurationProperties("ogham.freemarker")
7
public class OghamFreemarkerProperties {
8
	/**
9
	 * Default charset encoding for Freemarker templates
10
	 */
11
	private String defaultEncoding;
12
	@NestedConfigurationProperty
13
	private SpringBeansProperties springBeans = new SpringBeansProperties();
14
	@NestedConfigurationProperty
15
	private StaticMethodAccess staticMethodAccess = new StaticMethodAccess();
16
17
	public String getDefaultEncoding() {
18 1 1. getDefaultEncoding : replaced return value with "" for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getDefaultEncoding → RUN_ERROR
		return defaultEncoding;
19
	}
20
21
	public void setDefaultEncoding(String defaultEncoding) {
22
		this.defaultEncoding = defaultEncoding;
23
	}
24
25
	public SpringBeansProperties getSpringBeans() {
26 1 1. getSpringBeans : replaced return value with null for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getSpringBeans → RUN_ERROR
		return springBeans;
27
	}
28
29
	public void setSpringBeans(SpringBeansProperties springBeans) {
30
		this.springBeans = springBeans;
31
	}
32
33
	public StaticMethodAccess getStaticMethodAccess() {
34 1 1. getStaticMethodAccess : replaced return value with null for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getStaticMethodAccess → RUN_ERROR
		return staticMethodAccess;
35
	}
36
37
	public void setStaticMethodAccess(StaticMethodAccess staticMethodAccess) {
38
		this.staticMethodAccess = staticMethodAccess;
39
	}
40
41
	public static class SpringBeansProperties {
42
		/**
43
		 * Access Spring beans from templates using
44
		 * {@code @beanName.methodName(args)}
45
		 */
46
		private boolean enable = true;
47
48
		public boolean isEnable() {
49 2 1. isEnable : replaced boolean return with false for fr/sii/ogham/spring/template/OghamFreemarkerProperties$SpringBeansProperties::isEnable → RUN_ERROR
2. isEnable : replaced boolean return with true for fr/sii/ogham/spring/template/OghamFreemarkerProperties$SpringBeansProperties::isEnable → RUN_ERROR
			return enable;
50
		}
51
52
		public void setEnable(boolean enable) {
53
			this.enable = enable;
54
		}
55
	}
56
57
	public static class StaticMethodAccess {
58
		/**
59
		 * Access static methods from templates using
60
		 * {@code ${statics['full.package.name.ClassName'].method(args)}}<br />
61
		 * <br />
62
		 * You can change the name of the variable used to access static methods
63
		 * by setting the property
64
		 * ogham.freemarker.static-method-access.variable-name
65
		 */
66
		private boolean enable = true;
67
		/**
68
		 * Change the name of the variable name used in templates to access
69
		 * static methods
70
		 */
71
		private String variableName = "statics";
72
73
		public boolean isEnable() {
74 2 1. isEnable : replaced boolean return with true for fr/sii/ogham/spring/template/OghamFreemarkerProperties$StaticMethodAccess::isEnable → RUN_ERROR
2. isEnable : replaced boolean return with false for fr/sii/ogham/spring/template/OghamFreemarkerProperties$StaticMethodAccess::isEnable → RUN_ERROR
			return enable;
75
		}
76
77
		public void setEnable(boolean enable) {
78
			this.enable = enable;
79
		}
80
81
		public String getVariableName() {
82 1 1. getVariableName : replaced return value with "" for fr/sii/ogham/spring/template/OghamFreemarkerProperties$StaticMethodAccess::getVariableName → RUN_ERROR
			return variableName;
83
		}
84
85
		public void setVariableName(String variableName) {
86
			this.variableName = variableName;
87
		}
88
	}
89
}

Mutations

18

1.1
Location : getDefaultEncoding
Killed by :
replaced return value with "" for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getDefaultEncoding → RUN_ERROR

26

1.1
Location : getSpringBeans
Killed by :
replaced return value with null for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getSpringBeans → RUN_ERROR

34

1.1
Location : getStaticMethodAccess
Killed by :
replaced return value with null for fr/sii/ogham/spring/template/OghamFreemarkerProperties::getStaticMethodAccess → RUN_ERROR

49

1.1
Location : isEnable
Killed by :
replaced boolean return with false for fr/sii/ogham/spring/template/OghamFreemarkerProperties$SpringBeansProperties::isEnable → RUN_ERROR

2.2
Location : isEnable
Killed by :
replaced boolean return with true for fr/sii/ogham/spring/template/OghamFreemarkerProperties$SpringBeansProperties::isEnable → RUN_ERROR

74

1.1
Location : isEnable
Killed by :
replaced boolean return with true for fr/sii/ogham/spring/template/OghamFreemarkerProperties$StaticMethodAccess::isEnable → RUN_ERROR

2.2
Location : isEnable
Killed by :
replaced boolean return with false for fr/sii/ogham/spring/template/OghamFreemarkerProperties$StaticMethodAccess::isEnable → RUN_ERROR

82

1.1
Location : getVariableName
Killed by :
replaced return value with "" for fr/sii/ogham/spring/template/OghamFreemarkerProperties$StaticMethodAccess::getVariableName → RUN_ERROR

Active mutators

Tests examined


Report generated by PIT 1.13.1