| 1 | package fr.sii.ogham.testing.extension.junit.sms.config; | |
| 2 | ||
| 3 | import fr.sii.ogham.testing.sms.simulator.config.RandomServerPortProvider; | |
| 4 | import fr.sii.ogham.testing.sms.simulator.config.ServerPortProvider; | |
| 5 | ||
| 6 | /** | |
| 7 | * Configuration that builds a {@link RandomServerPortProvider} with the provided range | |
| 8 | * of ports. {@link RandomServerPortProvider} will in turn provide a random port that is | |
| 9 | * in the provided range. | |
| 10 | * | |
| 11 | * @author Aurélien Baudet | |
| 12 | * | |
| 13 | */ | |
| 14 | public class RandomPortConfig implements PortConfig { | |
| 15 | private final int minPort; | |
| 16 | private final int maxPort; | |
| 17 | ||
| 18 | /** | |
| 19 | * Initialize with the port range. | |
| 20 | * | |
| 21 | * @param minPort | |
| 22 | * the minimum port value | |
| 23 | * @param maxPort | |
| 24 | * the maximum port value | |
| 25 | */ | |
| 26 | public RandomPortConfig(int minPort, int maxPort) { | |
| 27 | super(); | |
| 28 | this.minPort = minPort; | |
| 29 | this.maxPort = maxPort; | |
| 30 | } | |
| 31 | ||
| 32 | @Override | |
| 33 | public ServerPortProvider build() { | |
| 34 |
7
1. build : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/RandomPortConfig::build → NO_COVERAGE 2. build : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/RandomPortConfig::build → KILLED 3. build : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/RandomPortConfig::build → KILLED 4. build : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/RandomPortConfig::build → KILLED 5. build : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/RandomPortConfig::build → KILLED 6. build : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/RandomPortConfig::build → KILLED 7. build : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/config/RandomPortConfig::build → KILLED |
return new RandomServerPortProvider(minPort, maxPort); |
| 35 | } | |
| 36 | ||
| 37 | } | |
Mutations | ||
| 34 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |