| 1 | package fr.sii.ogham.testing.sms.simulator.config; | |
| 2 | ||
| 3 | import java.util.List; | |
| 4 | ||
| 5 | /** | |
| 6 | * Configuration for local server used to simulate a SMPP server. | |
| 7 | * | |
| 8 | * @author Aurélien Baudet | |
| 9 | * | |
| 10 | */ | |
| 11 | public class SimulatorConfiguration { | |
| 12 | private ServerPortProvider portProvider; | |
| 13 | private List<Credentials> credentials; | |
| 14 | private ServerDelays serverDelays; | |
| 15 | private boolean keepMessages; | |
| 16 | ||
| 17 | /** | |
| 18 | * Get the configuration that provides a port for the server | |
| 19 | * | |
| 20 | * @return the port configuration | |
| 21 | */ | |
| 22 | public ServerPortProvider getPortProvider() { | |
| 23 |
6
1. getPortProvider : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getPortProvider → NO_COVERAGE 2. getPortProvider : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getPortProvider → TIMED_OUT 3. getPortProvider : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getPortProvider → KILLED 4. getPortProvider : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getPortProvider → KILLED 5. getPortProvider : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getPortProvider → KILLED 6. getPortProvider : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getPortProvider → KILLED |
return portProvider; |
| 24 | } | |
| 25 | ||
| 26 | /** | |
| 27 | * Set the configuration that provides a port for the server | |
| 28 | * | |
| 29 | * @param port | |
| 30 | * the port configuration | |
| 31 | */ | |
| 32 | public void setPort(ServerPortProvider port) { | |
| 33 | this.portProvider = port; | |
| 34 | } | |
| 35 | ||
| 36 | /** | |
| 37 | * Get the allowed credentials | |
| 38 | * | |
| 39 | * @return the allowed credentials | |
| 40 | */ | |
| 41 | public List<Credentials> getCredentials() { | |
| 42 |
5
1. getCredentials : replaced return value with Collections.emptyList for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getCredentials → SURVIVED 2. getCredentials : replaced return value with Collections.emptyList for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getCredentials → NO_COVERAGE 3. getCredentials : replaced return value with Collections.emptyList for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getCredentials → TIMED_OUT 4. getCredentials : replaced return value with Collections.emptyList for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getCredentials → KILLED 5. getCredentials : replaced return value with Collections.emptyList for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getCredentials → KILLED |
return credentials; |
| 43 | } | |
| 44 | ||
| 45 | /** | |
| 46 | * Set the allowed credentials | |
| 47 | * | |
| 48 | * @param credentials | |
| 49 | * the allowed credentials | |
| 50 | */ | |
| 51 | public void setCredentials(List<Credentials> credentials) { | |
| 52 | this.credentials = credentials; | |
| 53 | } | |
| 54 | ||
| 55 | /** | |
| 56 | * Control delays to simulate a slow server. | |
| 57 | * | |
| 58 | * @return the delay configuration | |
| 59 | */ | |
| 60 | public ServerDelays getServerDelays() { | |
| 61 |
5
1. getServerDelays : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getServerDelays → NO_COVERAGE 2. getServerDelays : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getServerDelays → SURVIVED 3. getServerDelays : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getServerDelays → TIMED_OUT 4. getServerDelays : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getServerDelays → KILLED 5. getServerDelays : replaced return value with null for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::getServerDelays → KILLED |
return serverDelays; |
| 62 | } | |
| 63 | ||
| 64 | /** | |
| 65 | * Control delays to simulate a slow server. | |
| 66 | * | |
| 67 | * @param serverDelays | |
| 68 | * the delay configuration | |
| 69 | */ | |
| 70 | public void setServerDelays(ServerDelays serverDelays) { | |
| 71 | this.serverDelays = serverDelays; | |
| 72 | } | |
| 73 | ||
| 74 | /** | |
| 75 | * If the server is restarted, it indicates if received messages in the | |
| 76 | * previous session should be kept (true) or dropped (false). | |
| 77 | * | |
| 78 | * @return indicate if messages should be kept or not between sessions | |
| 79 | */ | |
| 80 | public boolean isKeepMessages() { | |
| 81 |
7
1. isKeepMessages : replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::isKeepMessages → SURVIVED 2. isKeepMessages : replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::isKeepMessages → NO_COVERAGE 3. isKeepMessages : replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::isKeepMessages → NO_COVERAGE 4. isKeepMessages : replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::isKeepMessages → SURVIVED 5. isKeepMessages : replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::isKeepMessages → TIMED_OUT 6. isKeepMessages : replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::isKeepMessages → TIMED_OUT 7. isKeepMessages : replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/config/SimulatorConfiguration::isKeepMessages → KILLED |
return keepMessages; |
| 82 | } | |
| 83 | ||
| 84 | /** | |
| 85 | * If the server is restarted, it indicates if received messages in the | |
| 86 | * previous session should be kept (true) or dropped (false). | |
| 87 | * | |
| 88 | * @param keepMessages | |
| 89 | * indicate if messages should be kept or not between sessions | |
| 90 | */ | |
| 91 | public void setKeepMessages(boolean keepMessages) { | |
| 92 | this.keepMessages = keepMessages; | |
| 93 | } | |
| 94 | ||
| 95 | /** | |
| 96 | * Reset the configuration to be reused by the same server | |
| 97 | */ | |
| 98 | public void reset() { | |
| 99 |
1
1. reset : removed call to fr/sii/ogham/testing/sms/simulator/config/ServerPortProvider::reset → NO_COVERAGE |
portProvider.reset(); |
| 100 | } | |
| 101 | ||
| 102 | } | |
Mutations | ||
| 23 |
1.1 2.2 3.3 4.4 5.5 6.6 |
|
| 42 |
1.1 2.2 3.3 4.4 5.5 |
|
| 61 |
1.1 2.2 3.3 4.4 5.5 |
|
| 81 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
| 99 |
1.1 |