1 | package fr.sii.ogham.testing.assertion.sms; | |
2 | ||
3 | import fr.sii.ogham.testing.sms.simulator.bean.Address; | |
4 | import fr.sii.ogham.testing.sms.simulator.bean.NumberingPlanIndicator; | |
5 | import fr.sii.ogham.testing.sms.simulator.bean.TypeOfNumber; | |
6 | ||
7 | /** | |
8 | * Represents a phone number with {@link TypeOfNumber} and | |
9 | * {@link NumberingPlanIndicator} information. | |
10 | * | |
11 | * @author Aurélien Baudet | |
12 | * | |
13 | */ | |
14 | public class PhoneNumberInfo { | |
15 | private final String address; | |
16 | private final byte npi; | |
17 | private final byte ton; | |
18 | ||
19 | /** | |
20 | * Initializes with an {@link Address} | |
21 | * | |
22 | * @param address | |
23 | * the address (phone number + {@link NumberingPlanIndicator} + | |
24 | * {@link TypeOfNumber}) | |
25 | */ | |
26 | public PhoneNumberInfo(Address address) { | |
27 | this(address.getAddress(), address.getNpi(), address.getTon()); | |
28 | } | |
29 | ||
30 | /** | |
31 | * @param address | |
32 | * the phone number | |
33 | * @param npi | |
34 | * the {@link NumberingPlanIndicator} | |
35 | * @param ton | |
36 | * the {@link TypeOfNumber} | |
37 | */ | |
38 | public PhoneNumberInfo(String address, byte npi, byte ton) { | |
39 | super(); | |
40 | this.address = address; | |
41 | this.npi = npi; | |
42 | this.ton = ton; | |
43 | } | |
44 | ||
45 | /** | |
46 | * @return the address (may be phone number, IP address or anything else) | |
47 | */ | |
48 | public String getAddress() { | |
49 |
4
1. getAddress : replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getAddress → NO_COVERAGE 2. getAddress : replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getAddress → KILLED 3. getAddress : replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getAddress → KILLED 4. getAddress : replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getAddress → KILLED |
return address; |
50 | } | |
51 | ||
52 | /** | |
53 | * @return the {@link NumberingPlanIndicator} | |
54 | */ | |
55 | public byte getNpi() { | |
56 |
4
1. getNpi : replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getNpi → NO_COVERAGE 2. getNpi : replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getNpi → KILLED 3. getNpi : replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getNpi → KILLED 4. getNpi : replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getNpi → KILLED |
return npi; |
57 | } | |
58 | ||
59 | /** | |
60 | * @return the {@link TypeOfNumber} | |
61 | */ | |
62 | public byte getTon() { | |
63 |
4
1. getTon : replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getTon → SURVIVED 2. getTon : replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getTon → NO_COVERAGE 3. getTon : replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getTon → KILLED 4. getTon : replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getTon → KILLED |
return ton; |
64 | } | |
65 | ||
66 | @Override | |
67 | public String toString() { | |
68 |
2
1. toString : replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::toString → NO_COVERAGE 2. toString : replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::toString → KILLED |
return "PhoneNumberInfo [address=" + address + ", npi=" + npi + ", ton=" + ton + "]"; |
69 | } | |
70 | } | |
Mutations | ||
49 |
1.1 2.2 3.3 4.4 |
|
56 |
1.1 2.2 3.3 4.4 |
|
63 |
1.1 2.2 3.3 4.4 |
|
68 |
1.1 2.2 |