OghamSmsProperties.java

1
package fr.sii.ogham.spring.sms;
2
3
import java.util.List;
4
5
import org.springframework.boot.context.properties.ConfigurationProperties;
6
import org.springframework.boot.context.properties.NestedConfigurationProperty;
7
8
import fr.sii.ogham.spring.common.MessageSpecificFreemarkerProperties;
9
import fr.sii.ogham.spring.common.MessageSpecificTemplateProperties;
10
import fr.sii.ogham.spring.common.MessageSpecificThymeleafProperties;
11
import fr.sii.ogham.spring.common.OghamTemplateProperties;
12
import fr.sii.ogham.spring.common.SendRetryProperties;
13
14
@ConfigurationProperties("ogham.sms")
15
public class OghamSmsProperties implements OghamTemplateProperties {
16
	@NestedConfigurationProperty
17
	private FromProperties from = new FromProperties();
18
	@NestedConfigurationProperty
19
	private ToProperties to = new ToProperties();
20
	@NestedConfigurationProperty
21
	private MessageSpecificFreemarkerProperties freemarker = new MessageSpecificFreemarkerProperties();
22
	@NestedConfigurationProperty
23
	private MessageSpecificThymeleafProperties thymeleaf = new MessageSpecificThymeleafProperties();
24
	@NestedConfigurationProperty
25
	private MessageSpecificTemplateProperties template = new MessageSpecificTemplateProperties();
26
	@NestedConfigurationProperty
27
	private SplitProperties split = new SplitProperties();
28
	@NestedConfigurationProperty
29
	private SendRetryProperties sendRetry = new SendRetryProperties();
30
31
	public FromProperties getFrom() {
32 2 1. getFrom : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getFrom → KILLED
2. getFrom : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getFrom → KILLED
		return from;
33
	}
34
35
	public void setFrom(FromProperties from) {
36
		this.from = from;
37
	}
38
39
	public ToProperties getTo() {
40 2 1. getTo : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getTo → KILLED
2. getTo : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getTo → KILLED
		return to;
41
	}
42
43
	public void setTo(ToProperties to) {
44
		this.to = to;
45
	}
46
47
	public MessageSpecificFreemarkerProperties getFreemarker() {
48 2 1. getFreemarker : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getFreemarker → KILLED
2. getFreemarker : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getFreemarker → KILLED
		return freemarker;
49
	}
50
51
	public void setFreemarker(MessageSpecificFreemarkerProperties freemarker) {
52
		this.freemarker = freemarker;
53
	}
54
55
	public MessageSpecificThymeleafProperties getThymeleaf() {
56 2 1. getThymeleaf : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getThymeleaf → KILLED
2. getThymeleaf : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getThymeleaf → KILLED
		return thymeleaf;
57
	}
58
59
	public void setThymeleaf(MessageSpecificThymeleafProperties thymeleaf) {
60
		this.thymeleaf = thymeleaf;
61
	}
62
63
	public MessageSpecificTemplateProperties getTemplate() {
64 2 1. getTemplate : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getTemplate → KILLED
2. getTemplate : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getTemplate → KILLED
		return template;
65
	}
66
67
	public void setTemplate(MessageSpecificTemplateProperties template) {
68
		this.template = template;
69
	}
70
71
	public SplitProperties getSplit() {
72 2 1. getSplit : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getSplit → KILLED
2. getSplit : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getSplit → KILLED
		return split;
73
	}
74
75
	public void setSplit(SplitProperties split) {
76
		this.split = split;
77
	}
78
79
	public SendRetryProperties getSendRetry() {
80 2 1. getSendRetry : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getSendRetry → KILLED
2. getSendRetry : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getSendRetry → KILLED
		return sendRetry;
81
	}
82
83
	public void setSendRetry(SendRetryProperties sendRetry) {
84
		this.sendRetry = sendRetry;
85
	}
86
87
	public static class FromProperties {
88
		/**
89
		 * If no sender phone number is explicitly defined on the message, Ogham
90
		 * will use this phone number as default sender number.
91
		 */
92
		private String defaultValue;
93
		@NestedConfigurationProperty
94
		private FromAlphanumericCodeProperties alphanumericCodeFormat = new FromAlphanumericCodeProperties();
95
		@NestedConfigurationProperty
96
		private FromShortCodeProperties shortCodeFormat = new FromShortCodeProperties();
97
		@NestedConfigurationProperty
98
		private FromInternationalFormatProperties internationalFormat = new FromInternationalFormatProperties();
99
100
		public String getDefaultValue() {
101 1 1. getDefaultValue : replaced return value with "" for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getDefaultValue → SURVIVED
			return defaultValue;
102
		}
103
104
		public void setDefaultValue(String defaultValue) {
105
			this.defaultValue = defaultValue;
106
		}
107
108
		public FromAlphanumericCodeProperties getAlphanumericCodeFormat() {
109 2 1. getAlphanumericCodeFormat : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getAlphanumericCodeFormat → KILLED
2. getAlphanumericCodeFormat : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getAlphanumericCodeFormat → KILLED
			return alphanumericCodeFormat;
110
		}
111
112
		public void setAlphanumericCode(FromAlphanumericCodeProperties alphanumericCode) {
113
			this.alphanumericCodeFormat = alphanumericCode;
114
		}
115
116
		public FromShortCodeProperties getShortCodeFormat() {
117 2 1. getShortCodeFormat : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getShortCodeFormat → KILLED
2. getShortCodeFormat : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getShortCodeFormat → KILLED
			return shortCodeFormat;
118
		}
119
120
		public void setShortcode(FromShortCodeProperties shortcode) {
121
			this.shortCodeFormat = shortcode;
122
		}
123
124
		public FromInternationalFormatProperties getInternationalFormat() {
125 2 1. getInternationalFormat : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getInternationalFormat → KILLED
2. getInternationalFormat : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getInternationalFormat → KILLED
			return internationalFormat;
126
		}
127
128
		public void setInternationalFormat(FromInternationalFormatProperties internationalFormat) {
129
			this.internationalFormat = internationalFormat;
130
		}
131
	}
132
133
	public static class FromAlphanumericCodeProperties {
134
		/**
135
		 * Enable/disable alphanumeric code format conversion for sender phone
136
		 * number: if the sender address is alphanumeric (contains both letters
137
		 * and numbers) or non-numeric, TON is set to 5 and NPI to 0.
138
		 */
139
		private Boolean enable;
140
141
		public Boolean getEnable() {
142 2 1. getEnable : replaced Boolean return with False for fr/sii/ogham/spring/sms/OghamSmsProperties$FromAlphanumericCodeProperties::getEnable → SURVIVED
2. getEnable : replaced Boolean return with True for fr/sii/ogham/spring/sms/OghamSmsProperties$FromAlphanumericCodeProperties::getEnable → SURVIVED
			return enable;
143
		}
144
145
		public void setEnable(Boolean enable) {
146
			this.enable = enable;
147
		}
148
	}
149
150
	public static class FromShortCodeProperties {
151
		/**
152
		 * Enable/disable short code format conversion for sender phone number:
153
		 * if the sender address is a short code, TON is set to 3, and NPI is
154
		 * set to 0. A number is considered to be a short code if the length of
155
		 * the number is 5 digits or less.
156
		 */
157
		private Boolean enable;
158
159
		public Boolean getEnable() {
160 2 1. getEnable : replaced Boolean return with False for fr/sii/ogham/spring/sms/OghamSmsProperties$FromShortCodeProperties::getEnable → SURVIVED
2. getEnable : replaced Boolean return with True for fr/sii/ogham/spring/sms/OghamSmsProperties$FromShortCodeProperties::getEnable → SURVIVED
			return enable;
161
		}
162
163
		public void setEnable(Boolean enable) {
164
			this.enable = enable;
165
		}
166
167
	}
168
169
	public static class FromInternationalFormatProperties {
170
		/**
171
		 * Enable/disable international number format conversion for sender
172
		 * phone number: if the sender starts with a "+", TON is set to 1, and
173
		 * NPI is set to 1.
174
		 * 
175
		 */
176
		private Boolean enable;
177
178
		public Boolean getEnable() {
179 3 1. getEnable : replaced Boolean return with False for fr/sii/ogham/spring/sms/OghamSmsProperties$FromInternationalFormatProperties::getEnable → SURVIVED
2. getEnable : replaced Boolean return with True for fr/sii/ogham/spring/sms/OghamSmsProperties$FromInternationalFormatProperties::getEnable → SURVIVED
3. getEnable : replaced Boolean return with True for fr/sii/ogham/spring/sms/OghamSmsProperties$FromInternationalFormatProperties::getEnable → TIMED_OUT
			return enable;
180
		}
181
182
		public void setEnable(Boolean enable) {
183
			this.enable = enable;
184
		}
185
186
	}
187
188
	public static class ToProperties {
189
		/**
190
		 * If no recipient phone number is explicitly defined on the message,
191
		 * Ogham will use this phone number as default recipient number.
192
		 */
193
		private List<String> defaultValue;
194
		@NestedConfigurationProperty
195
		private ToInternationalFormatProperties internationalFormat = new ToInternationalFormatProperties();
196
197
		public List<String> getDefaultValue() {
198 1 1. getDefaultValue : replaced return value with Collections.emptyList for fr/sii/ogham/spring/sms/OghamSmsProperties$ToProperties::getDefaultValue → SURVIVED
			return defaultValue;
199
		}
200
		
201
		public void setDefaultValue(List<String> defaultValue) {
202
			this.defaultValue = defaultValue;
203
		}
204
205
		public ToInternationalFormatProperties getInternationalFormat() {
206 2 1. getInternationalFormat : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$ToProperties::getInternationalFormat → KILLED
2. getInternationalFormat : replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$ToProperties::getInternationalFormat → KILLED
			return internationalFormat;
207
		}
208
209
		public void setInternationalFormat(ToInternationalFormatProperties internationalFormat) {
210
			this.internationalFormat = internationalFormat;
211
		}
212
	}
213
214
	public static class ToInternationalFormatProperties {
215
		/**
216
		 * Enable/disable international number format conversion for recipient
217
		 * phone number: if the recipient starts with a "+", TON is set to 1,
218
		 * and NPI is set to 1.
219
		 * 
220
		 */
221
		private Boolean enable;
222
223
		public Boolean getEnable() {
224 2 1. getEnable : replaced Boolean return with False for fr/sii/ogham/spring/sms/OghamSmsProperties$ToInternationalFormatProperties::getEnable → SURVIVED
2. getEnable : replaced Boolean return with True for fr/sii/ogham/spring/sms/OghamSmsProperties$ToInternationalFormatProperties::getEnable → SURVIVED
			return enable;
225
		}
226
227
		public void setEnable(Boolean enable) {
228
			this.enable = enable;
229
		}
230
231
	}
232
}

Mutations

32

1.1
Location : getFrom
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getFrom → KILLED

2.2
Location : getFrom
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getFrom → KILLED

40

1.1
Location : getTo
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getTo → KILLED

2.2
Location : getTo
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getTo → KILLED

48

1.1
Location : getFreemarker
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getFreemarker → KILLED

2.2
Location : getFreemarker
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getFreemarker → KILLED

56

1.1
Location : getThymeleaf
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getThymeleaf → KILLED

2.2
Location : getThymeleaf
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getThymeleaf → KILLED

64

1.1
Location : getTemplate
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getTemplate → KILLED

2.2
Location : getTemplate
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getTemplate → KILLED

72

1.1
Location : getSplit
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getSplit → KILLED

2.2
Location : getSplit
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getSplit → KILLED

80

1.1
Location : getSendRetry
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getSendRetry → KILLED

2.2
Location : getSendRetry
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties::getSendRetry → KILLED

101

1.1
Location : getDefaultValue
Killed by : none
replaced return value with "" for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getDefaultValue → SURVIVED

109

1.1
Location : getAlphanumericCodeFormat
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getAlphanumericCodeFormat → KILLED

2.2
Location : getAlphanumericCodeFormat
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getAlphanumericCodeFormat → KILLED

117

1.1
Location : getShortCodeFormat
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getShortCodeFormat → KILLED

2.2
Location : getShortCodeFormat
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getShortCodeFormat → KILLED

125

1.1
Location : getInternationalFormat
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getInternationalFormat → KILLED

2.2
Location : getInternationalFormat
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$FromProperties::getInternationalFormat → KILLED

142

1.1
Location : getEnable
Killed by : none
replaced Boolean return with False for fr/sii/ogham/spring/sms/OghamSmsProperties$FromAlphanumericCodeProperties::getEnable → SURVIVED

2.2
Location : getEnable
Killed by : none
replaced Boolean return with True for fr/sii/ogham/spring/sms/OghamSmsProperties$FromAlphanumericCodeProperties::getEnable → SURVIVED

160

1.1
Location : getEnable
Killed by : none
replaced Boolean return with False for fr/sii/ogham/spring/sms/OghamSmsProperties$FromShortCodeProperties::getEnable → SURVIVED

2.2
Location : getEnable
Killed by : none
replaced Boolean return with True for fr/sii/ogham/spring/sms/OghamSmsProperties$FromShortCodeProperties::getEnable → SURVIVED

179

1.1
Location : getEnable
Killed by : none
replaced Boolean return with False for fr/sii/ogham/spring/sms/OghamSmsProperties$FromInternationalFormatProperties::getEnable → SURVIVED

2.2
Location : getEnable
Killed by : none
replaced Boolean return with True for fr/sii/ogham/spring/sms/OghamSmsProperties$FromInternationalFormatProperties::getEnable → TIMED_OUT

3.3
Location : getEnable
Killed by : none
replaced Boolean return with True for fr/sii/ogham/spring/sms/OghamSmsProperties$FromInternationalFormatProperties::getEnable → SURVIVED

198

1.1
Location : getDefaultValue
Killed by : none
replaced return value with Collections.emptyList for fr/sii/ogham/spring/sms/OghamSmsProperties$ToProperties::getDefaultValue → SURVIVED

206

1.1
Location : getInternationalFormat
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$ToProperties::getInternationalFormat → KILLED

2.2
Location : getInternationalFormat
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/spring/sms/OghamSmsProperties$ToProperties::getInternationalFormat → KILLED

224

1.1
Location : getEnable
Killed by : none
replaced Boolean return with False for fr/sii/ogham/spring/sms/OghamSmsProperties$ToInternationalFormatProperties::getEnable → SURVIVED

2.2
Location : getEnable
Killed by : none
replaced Boolean return with True for fr/sii/ogham/spring/sms/OghamSmsProperties$ToInternationalFormatProperties::getEnable → SURVIVED

Active mutators

Tests examined


Report generated by PIT OGHAM