ConfigurationValueBuilderDelegate.java

1
package fr.sii.ogham.core.builder.configuration;
2
3
import java.util.Optional;
4
5
import fr.sii.ogham.core.fluent.AbstractParent;
6
7
/**
8
 * Implementation that just delegates all operations to another builder.
9
 * 
10
 * <p>
11
 * This is useful when a {@link ConfigurationValueBuilder} is used for a
12
 * particular parent and it must be inherited. As the parent types are not the
13
 * same, you can't directly use the same reference. So this implementation wraps
14
 * the original reference but as it is a new instance, it can have a different
15
 * parent builder.
16
 * </p>
17
 * 
18
 * @author Aurélien Baudet
19
 *
20
 * @param <P>
21
 *            the type of the parent builder (when calling {@link #and()}
22
 *            method)
23
 * @param <V>
24
 *            the type of the value
25
 */
26
public class ConfigurationValueBuilderDelegate<P, V> extends AbstractParent<P> implements ConfigurationValueBuilder<P, V> {
27
	private final ConfigurationValueBuilder<?, V> delegate;
28
29
	/**
30
	 * Wraps the delegate builder. The delegated builder parent is not used.
31
	 * This instance uses the provided parent instead for chaining.
32
	 * 
33
	 * @param parent
34
	 *            the new parent used for chaining
35
	 * @param delegate
36
	 *            the instance that will really be updated
37
	 */
38
	public ConfigurationValueBuilderDelegate(P parent, ConfigurationValueBuilder<?, V> delegate) {
39
		super(parent);
40
		this.delegate = delegate;
41
	}
42
43
	@Override
44
	public ConfigurationValueBuilder<P, V> properties(String... properties) {
45
		delegate.properties(properties);
46 8 1. properties : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → NO_COVERAGE
2. properties : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED
3. properties : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED
4. properties : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED
5. properties : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED
6. properties : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED
7. properties : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED
8. properties : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED
		return this;
47
	}
48
49
	@Override
50
	public ConfigurationValueBuilder<P, V> defaultValue(V value) {
51
		delegate.defaultValue(value);
52 1 1. defaultValue : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → NO_COVERAGE
		return this;
53
	}
54
55
	@Override
56
	@SuppressWarnings("squid:S3553")
57
	public ConfigurationValueBuilder<P, V> value(Optional<V> optionalValue) {
58
		delegate.value(optionalValue);
59 3 1. value : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::value → NO_COVERAGE
2. value : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::value → KILLED
3. value : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::value → KILLED
		return this;
60
	}
61
62
	@Override
63
	public ConfigurationValueBuilder<P, V> defaultValue(MayOverride<V> possibleNewValue) {
64
		delegate.defaultValue(possibleNewValue);
65 8 1. defaultValue : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → NO_COVERAGE
2. defaultValue : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → TIMED_OUT
3. defaultValue : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED
4. defaultValue : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED
5. defaultValue : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED
6. defaultValue : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED
7. defaultValue : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED
8. defaultValue : replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED
		return this;
66
	}
67
68
}

Mutations

46

1.1
Location : properties
Killed by : oghamall.it.html.translator.JsoupInlineCssTranslatorTest.notHtml(oghamall.it.html.translator.JsoupInlineCssTranslatorTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED

2.2
Location : properties
Killed by : oghamsmsglobal.it.SmsglobalServiceProviderConfigurerSpec
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED

3.3
Location : properties
Killed by : oghamcore.it.core.service.CleanupTest.manualCleanupShouldAutomaticallyCleanTheSenders(oghamcore.it.core.service.CleanupTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED

4.4
Location : properties
Killed by : oghamjavamail.it.UnreadableAttachmentTest.attachmentUnreadable(oghamjavamail.it.UnreadableAttachmentTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED

5.5
Location : properties
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED

6.6
Location : properties
Killed by : none
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → NO_COVERAGE

7.7
Location : properties
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED

8.8
Location : properties
Killed by : oghamcloudhopper.it.AutoRetryExtensionTest.smsNotRetriedDueToCloudhopperError(oghamcloudhopper.it.AutoRetryExtensionTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::properties → KILLED

52

1.1
Location : defaultValue
Killed by : none
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → NO_COVERAGE

59

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

2.2
Location : value
Killed by : oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests.oghamPropertiesWithSpringPropsShouldUseOghamPropertiesPrecedence(oghamspringbootv2autoconfigure.it.OghamSpringBoot2JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::value → KILLED

3.3
Location : value
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::value → KILLED

65

1.1
Location : defaultValue
Killed by : oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests.oghamAloneShouldUseOghamProperties(oghamspringbootv1autoconfigure.it.OghamSpringBoot1JavaMailAutoConfigurationTests)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED

2.2
Location : defaultValue
Killed by : oghamcloudhopper.it.AutoRetryExtensionTest.smsNotRetriedDueToCloudhopperError(oghamcloudhopper.it.AutoRetryExtensionTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED

3.3
Location : defaultValue
Killed by : none
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → NO_COVERAGE

4.4
Location : defaultValue
Killed by : oghamsmsglobal.it.SmsglobalServiceProviderConfigurerSpec
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED

5.5
Location : defaultValue
Killed by : none
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → TIMED_OUT

6.6
Location : defaultValue
Killed by : oghamall.it.configuration.EmptyBuilderTest.emailSenderManuallyRegisteredButUnconfiguredTemplateParsersCantHandleMultiTemplateContent(oghamall.it.configuration.EmptyBuilderTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED

7.7
Location : defaultValue
Killed by : oghamjavamail.it.UnreadableAttachmentTest.attachmentUnreadable(oghamjavamail.it.UnreadableAttachmentTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED

8.8
Location : defaultValue
Killed by : oghamcore.it.core.service.CleanupTest.manualCleanupShouldAutomaticallyCleanTheSenders(oghamcore.it.core.service.CleanupTest)
replaced return value with null for fr/sii/ogham/core/builder/configuration/ConfigurationValueBuilderDelegate::defaultValue → KILLED

Active mutators

Tests examined


Report generated by PIT OGHAM