1 | package fr.sii.ogham.testing.extension.junit.sms; | |
2 | ||
3 | import org.jsmpp.bean.SubmitSm; | |
4 | ||
5 | import fr.sii.ogham.testing.extension.junit.sms.config.ServerConfig; | |
6 | import fr.sii.ogham.testing.sms.simulator.SmppServerSimulator; | |
7 | import fr.sii.ogham.testing.sms.simulator.config.SimulatorConfiguration; | |
8 | import fr.sii.ogham.testing.sms.simulator.jsmpp.JSMPPServer; | |
9 | import fr.sii.ogham.testing.sms.simulator.jsmpp.SubmitSmAdapter; | |
10 | ||
11 | /** | |
12 | * JUnit extension that start a SMPP server based on JSMPP implementation. | |
13 | * | |
14 | * @author Aurélien Baudet | |
15 | * | |
16 | */ | |
17 | public class JsmppServerExtension extends SmppServerExtension<SubmitSm> { | |
18 | ||
19 | /** | |
20 | * Initialize the server with default configuration (random port). | |
21 | * | |
22 | */ | |
23 | public JsmppServerExtension() { | |
24 | super(); | |
25 | } | |
26 | ||
27 | /** | |
28 | * Initialize the server with provided configuration. | |
29 | * | |
30 | * @param config | |
31 | * the server configuration to simulate some behavior | |
32 | */ | |
33 | public JsmppServerExtension(ServerConfig config) { | |
34 | super(config); | |
35 | } | |
36 | ||
37 | @Override | |
38 | protected SmppServerSimulator<SubmitSm> initServer(SimulatorConfiguration config) { | |
39 |
1
1. initServer : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/JsmppServerExtension::initServer → NO_COVERAGE |
return new JSMPPServer(config); |
40 | } | |
41 | ||
42 | @Override | |
43 | protected fr.sii.ogham.testing.sms.simulator.bean.SubmitSm convert(SubmitSm raw) { | |
44 |
1
1. convert : replaced return value with null for fr/sii/ogham/testing/extension/junit/sms/JsmppServerExtension::convert → NO_COVERAGE |
return new SubmitSmAdapter(raw); |
45 | } | |
46 | ||
47 | } | |
Mutations | ||
39 |
1.1 |
|
44 |
1.1 |