ShortCodeNumberFormatHandler.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
 * Phone number handler for short codes. If the sender address is a short code,
9
 * TON is set to 3, and NPI is set to 0. A number is considered to be a short
10
 * code if the length of the number is 5 digits or less.
11
 * 
12
 * @author cdejonghe
13
 * 
14
 */
15
public class ShortCodeNumberFormatHandler extends AbstractFixedPhoneNumberHandler {
16
17
	private static final int SHORTCODE_LENGTH = 5;
18
19
	public ShortCodeNumberFormatHandler() {
20
		super(TypeOfNumber.NETWORK_SPECIFIC, NumberingPlanIndicator.UNKNOWN);
21
	}
22
23
	@Override
24
	public boolean supports(PhoneNumber phoneNumber) {
25 5 1. supports : negated conditional → NO_COVERAGE
2. supports : negated conditional → NO_COVERAGE
3. supports : negated conditional → NO_COVERAGE
4. supports : changed conditional boundary → NO_COVERAGE
5. supports : replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/ShortCodeNumberFormatHandler::supports → NO_COVERAGE
		return phoneNumber != null && phoneNumber.getNumber() != null && phoneNumber.getNumber().length() <= SHORTCODE_LENGTH;
26
	}
27
}

Mutations

25

1.1
Location : supports
Killed by :
negated conditional → NO_COVERAGE

2.2
Location : supports
Killed by :
negated conditional → NO_COVERAGE

3.3
Location : supports
Killed by :
negated conditional → NO_COVERAGE

4.4
Location : supports
Killed by :
changed conditional boundary → NO_COVERAGE

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

Active mutators

Tests examined


Report generated by PIT 1.13.1