CurrentValueNotSetOverride.java

1
package fr.sii.ogham.core.builder.configuration;
2
3
/**
4
 * Override the current value only if it is not set ({@code null}).
5
 * 
6
 * @author Aurélien Baudet
7
 *
8
 * @param <V>
9
 *            the type of the vlaue
10
 */
11
public class CurrentValueNotSetOverride<V> implements MayOverride<V> {
12
	private final V value;
13
14
	/**
15
	 * Initializes with the new value to set if current value is not set.
16
	 * 
17
	 * @param value
18
	 *            the new value
19
	 */
20
	public CurrentValueNotSetOverride(V value) {
21
		super();
22
		this.value = value;
23
	}
24
25
	@Override
26
	public V override(V currentValue) {
27 16 1. override : negated conditional → NO_COVERAGE
2. override : negated conditional → SURVIVED
3. override : replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → NO_COVERAGE
4. override : replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → SURVIVED
5. override : negated conditional → KILLED
6. override : negated conditional → KILLED
7. override : negated conditional → KILLED
8. override : negated conditional → KILLED
9. override : negated conditional → KILLED
10. override : negated conditional → KILLED
11. override : replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED
12. override : replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED
13. override : replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED
14. override : replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED
15. override : replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED
16. override : replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED
		return currentValue == null ? value : currentValue;
28
	}
29
30
}

Mutations

27

1.1
Location : override
Killed by : oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest.smsUsingFreemarkerTemplateShouldResolveBeans(oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest)
negated conditional → KILLED

2.2
Location : override
Killed by : oghamcore.ut.core.builder.configuration.MayOverrideSpec
negated conditional → KILLED

3.3
Location : override
Killed by : oghamcloudhopper.it.SendTimeoutTest.sendResponseTimeout(oghamcloudhopper.it.SendTimeoutTest)
negated conditional → KILLED

4.4
Location : override
Killed by : none
negated conditional → NO_COVERAGE

5.5
Location : override
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.smsUsingFreemarkerTemplateShouldBeAbleToCallStaticMethodsWithCustomVariableName(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
negated conditional → KILLED

6.6
Location : override
Killed by : none
negated conditional → SURVIVED

7.7
Location : override
Killed by : oghamall.it.sms.SmsCustomImplTest.simple(oghamall.it.sms.SmsCustomImplTest)
negated conditional → KILLED

8.8
Location : override
Killed by : oghamsmsglobal.it.SmsglobalServiceProviderConfigurerSpec
negated conditional → KILLED

9.9
Location : override
Killed by : none
replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → NO_COVERAGE

10.10
Location : override
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.smsUsingFreemarkerTemplateShouldBeAbleToCallStaticMethodsWithCustomVariableName(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED

11.11
Location : override
Killed by : oghamcloudhopper.it.SendTimeoutTest.sendResponseTimeout(oghamcloudhopper.it.SendTimeoutTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED

12.12
Location : override
Killed by : oghamcore.ut.core.builder.configuration.MayOverrideSpec
replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED

13.13
Location : override
Killed by : oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest.smsUsingFreemarkerTemplateShouldResolveBeans(oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED

14.14
Location : override
Killed by : none
replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → SURVIVED

15.15
Location : override
Killed by : oghamall.it.sms.SmsCustomImplTest.simple(oghamall.it.sms.SmsCustomImplTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED

16.16
Location : override
Killed by : oghamsmsglobal.it.SmsglobalServiceProviderConfigurerSpec
replaced return value with null for fr/sii/ogham/core/builder/configuration/CurrentValueNotSetOverride::override → KILLED

Active mutators

Tests examined


Report generated by PIT OGHAM