PhoneNumberInfo.java

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
Location : getAddress
Killed by : oghamall.it.sms.SmsSMPPGsm7bitTest.longMessage(oghamall.it.sms.SmsSMPPGsm7bitTest)
replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getAddress → KILLED

2.2
Location : getAddress
Killed by : none
replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getAddress → NO_COVERAGE

3.3
Location : getAddress
Killed by : oghamtesting.it.assertion.FluentSmsAssertionsSpec
replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getAddress → KILLED

4.4
Location : getAddress
Killed by : oghamcloudhopper.it.PartialConfigurationTest.nothingConfiguredAndLongMessageShouldSendOneLongMessageUsingDefaultEncoding(oghamcloudhopper.it.PartialConfigurationTest)
replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getAddress → KILLED

56

1.1
Location : getNpi
Killed by : none
replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getNpi → NO_COVERAGE

2.2
Location : getNpi
Killed by : oghamall.it.sms.SmsSMPPGsm7bitTest.longMessage(oghamall.it.sms.SmsSMPPGsm7bitTest)
replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getNpi → KILLED

3.3
Location : getNpi
Killed by : oghamcloudhopper.it.PartialConfigurationTest.nothingConfiguredAndLongMessageShouldSendOneLongMessageUsingDefaultEncoding(oghamcloudhopper.it.PartialConfigurationTest)
replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getNpi → KILLED

4.4
Location : getNpi
Killed by : oghamtesting.it.assertion.FluentSmsAssertionsSpec
replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getNpi → KILLED

63

1.1
Location : getTon
Killed by : none
replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getTon → SURVIVED

2.2
Location : getTon
Killed by : oghamtesting.it.assertion.FluentSmsAssertionsSpec
replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getTon → KILLED

3.3
Location : getTon
Killed by : none
replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getTon → NO_COVERAGE

4.4
Location : getTon
Killed by : oghamall.it.sms.SmsSMPPGsm7bitTest.longMessage(oghamall.it.sms.SmsSMPPGsm7bitTest)
replaced byte return with 0 for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::getTon → KILLED

68

1.1
Location : toString
Killed by : oghamtesting.it.assertion.FluentSmsAssertionsSpec
replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::toString → KILLED

2.2
Location : toString
Killed by : none
replaced return value with "" for fr/sii/ogham/testing/assertion/sms/PhoneNumberInfo::toString → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT OGHAM