NoConversionNeededConverter.java

1
package fr.sii.ogham.core.convert;
2
3
/**
4
 * A no-op converter that just casts the source to match the target type.
5
 * 
6
 * Cast is only applied if the source object is an instance of target type.
7
 * 
8
 * @author Aurélien Baudet
9
 *
10
 */
11
public class NoConversionNeededConverter implements SupportingConverter {
12
13
	@SuppressWarnings("unchecked")
14
	@Override
15
	public <T> T convert(Object source, Class<T> targetType) {
16 7 1. convert : replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → NO_COVERAGE
2. convert : replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → TIMED_OUT
3. convert : replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → KILLED
4. convert : replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → KILLED
5. convert : replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → KILLED
6. convert : replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → KILLED
7. convert : replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → KILLED
		return (T) source;
17
	}
18
19
	@Override
20
	public boolean supports(Class<?> sourceType, Class<?> targetType) {
21 11 1. supports : replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → NO_COVERAGE
2. supports : replaced boolean return with true for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → NO_COVERAGE
3. supports : replaced boolean return with true for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → SURVIVED
4. supports : replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → TIMED_OUT
5. supports : replaced boolean return with true for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → TIMED_OUT
6. supports : replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED
7. supports : replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED
8. supports : replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED
9. supports : replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED
10. supports : replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED
11. supports : replaced boolean return with true for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED
		return targetType.isAssignableFrom(sourceType);
22
	}
23
24
}

Mutations

16

1.1
Location : convert
Killed by : oghamall.it.configuration.SendGridConfigurationTest.asDeveloperIDefineApiKeyUsingProperties(oghamall.it.configuration.SendGridConfigurationTest)
replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → KILLED

2.2
Location : convert
Killed by : oghamjavamail.it.builder.OverridePropertiesTest.overrideProperties(oghamjavamail.it.builder.OverridePropertiesTest)
replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → KILLED

3.3
Location : convert
Killed by : oghamcore.it.core.configuration.ConfigurationLifecycleSpec
replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → KILLED

4.4
Location : convert
Killed by : oghamsmsglobal.it.SmsglobalServiceProviderConfigurerSpec
replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → KILLED

5.5
Location : convert
Killed by : none
replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → TIMED_OUT

6.6
Location : convert
Killed by : oghamcloudhopper.it.ConnectionFailureTest.invalidSystemId(oghamcloudhopper.it.ConnectionFailureTest)
replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → KILLED

7.7
Location : convert
Killed by : none
replaced return value with null for fr/sii/ogham/core/convert/NoConversionNeededConverter::convert → NO_COVERAGE

21

1.1
Location : supports
Killed by : oghamcore.it.core.configuration.ConfigurationLifecycleSpec
replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED

2.2
Location : supports
Killed by : oghamall.it.configuration.EmptyBuilderTest.emailSenderManuallyRegisteredButUnconfiguredTemplateParsersCantHandleMultiTemplateContent(oghamall.it.configuration.EmptyBuilderTest)
replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED

3.3
Location : supports
Killed by : oghamsmsglobal.it.SmsglobalServiceProviderConfigurerSpec
replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED

4.4
Location : supports
Killed by : none
replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → NO_COVERAGE

5.5
Location : supports
Killed by : oghamcloudhopper.it.ConnectionFailureTest.invalidSystemId(oghamcloudhopper.it.ConnectionFailureTest)
replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED

6.6
Location : supports
Killed by : oghamjavamail.it.builder.OverridePropertiesTest.overrideProperties(oghamjavamail.it.builder.OverridePropertiesTest)
replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED

7.7
Location : supports
Killed by : none
replaced boolean return with false for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → TIMED_OUT

8.8
Location : supports
Killed by : none
replaced boolean return with true for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → TIMED_OUT

9.9
Location : supports
Killed by : none
replaced boolean return with true for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → NO_COVERAGE

10.10
Location : supports
Killed by : none
replaced boolean return with true for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → SURVIVED

11.11
Location : supports
Killed by : oghamcore.it.core.convert.CustomConverterTest.asDeveloperIUseARegisterCustomConverter(oghamcore.it.core.convert.CustomConverterTest)
replaced boolean return with true for fr/sii/ogham/core/convert/NoConversionNeededConverter::supports → KILLED

Active mutators

Tests examined


Report generated by PIT OGHAM