InternationalNumberFormatHandler.java

1
package fr.sii.ogham.sms.message.addressing.translator;
2
3
import fr.sii.ogham.sms.message.PhoneNumber;
4
import fr.sii.ogham.sms.message.addressing.NumberingPlanIndicator;
5
import fr.sii.ogham.sms.message.addressing.TypeOfNumber;
6
7
/**
8
 * Loose International phone number handler. If the sender starts with a "+",
9
 * TON is set to 1, and NPI is set to 1.
10
 * 
11
 * @author cdejonghe
12
 * 
13
 */
14
public class InternationalNumberFormatHandler extends AbstractFixedPhoneNumberHandler {
15
16
	private static final String INTERNATION_NUMBER_PREFIX = "+";
17
18
	public InternationalNumberFormatHandler() {
19
		super(TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.ISDN_TELEPHONE);
20
	}
21
22
	@Override
23
	public boolean supports(PhoneNumber phoneNumber) {
24 4 1. supports : negated conditional → NO_COVERAGE
2. supports : replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/InternationalNumberFormatHandler::supports → NO_COVERAGE
3. supports : negated conditional → NO_COVERAGE
4. supports : negated conditional → NO_COVERAGE
		return phoneNumber != null && phoneNumber.getNumber() != null && phoneNumber.getNumber().startsWith(INTERNATION_NUMBER_PREFIX);
25
	}
26
}

Mutations

24

1.1
Location : supports
Killed by :
negated conditional → NO_COVERAGE

2.2
Location : supports
Killed by :
replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/InternationalNumberFormatHandler::supports → NO_COVERAGE

3.3
Location : supports
Killed by :
negated conditional → NO_COVERAGE

4.4
Location : supports
Killed by :
negated conditional → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.13.1