GreenMailRuleTestConfiguration.java

1
package fr.sii.ogham.testing.extension.spring;
2
3
import ogham.testing.com.icegreen.greenmail.junit4.GreenMailRule;
4
import ogham.testing.com.icegreen.greenmail.junit5.GreenMailExtension;
5
import ogham.testing.com.icegreen.greenmail.util.ServerSetup;
6
import org.springframework.beans.factory.annotation.Value;
7
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
8
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
9
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
10
import org.springframework.boot.test.context.TestConfiguration;
11
import org.springframework.context.annotation.Bean;
12
13
14
/**
15
 * Test configuration that registers:
16
 * <ul>
17
 * <li>{@link GreenMailRule} bean for JUnit 4</li>
18
 * </ul>
19
 * 
20
 * @author Aurélien Baudet
21
 *
22
 */
23
@TestConfiguration
24
@ConditionalOnClass(org.junit.rules.TestRule.class)
25
public class GreenMailRuleTestConfiguration {
26
	@Bean
27
	@ConditionalOnMissingBean(GreenMailRule.class)
28
	@ConditionalOnProperty("greenmail.smtp.port")
29
	public GreenMailRule randomSmtpPortGreenMailRule(@Value("${greenmail.smtp.port}") int port) {
30 1 1. randomSmtpPortGreenMailRule : replaced return value with null for fr/sii/ogham/testing/extension/spring/GreenMailRuleTestConfiguration::randomSmtpPortGreenMailRule → NO_COVERAGE
		return new GreenMailRule(new ServerSetup(port, null, ServerSetup.PROTOCOL_SMTP));
31
	}
32
}

Mutations

30

1.1
Location : randomSmtpPortGreenMailRule
Killed by :
replaced return value with null for fr/sii/ogham/testing/extension/spring/GreenMailRuleTestConfiguration::randomSmtpPortGreenMailRule → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.13.1