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 20 1. supports : replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/ShortCodeNumberFormatHandler::supports → NO_COVERAGE
2. supports : replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/ShortCodeNumberFormatHandler::supports → SURVIVED
3. supports : changed conditional boundary → SURVIVED
4. supports : changed conditional boundary → NO_COVERAGE
5. supports : negated conditional → NO_COVERAGE
6. supports : negated conditional → SURVIVED
7. supports : negated conditional → NO_COVERAGE
8. supports : negated conditional → SURVIVED
9. supports : negated conditional → SURVIVED
10. supports : negated conditional → NO_COVERAGE
11. supports : replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/ShortCodeNumberFormatHandler::supports → TIMED_OUT
12. supports : changed conditional boundary → TIMED_OUT
13. supports : negated conditional → TIMED_OUT
14. supports : negated conditional → TIMED_OUT
15. supports : negated conditional → TIMED_OUT
16. supports : replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/ShortCodeNumberFormatHandler::supports → KILLED
17. supports : changed conditional boundary → KILLED
18. supports : negated conditional → KILLED
19. supports : negated conditional → KILLED
20. supports : negated conditional → KILLED
		return phoneNumber != null && phoneNumber.getNumber() != null && phoneNumber.getNumber().length() <= SHORTCODE_LENGTH;
26
	}
27
}

Mutations

25

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

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

3.3
Location : supports
Killed by : oghamall.it.sms.message.addressing.translator.SenderPhoneNumberTranslatorTest.translateNoNumber(oghamall.it.sms.message.addressing.translator.SenderPhoneNumberTranslatorTest)
replaced boolean return with true for fr/sii/ogham/sms/message/addressing/translator/ShortCodeNumberFormatHandler::supports → KILLED

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

5.5
Location : supports
Killed by : none
changed conditional boundary → SURVIVED

6.6
Location : supports
Killed by : oghamall.it.sms.message.addressing.translator.SenderPhoneNumberTranslatorTest.translateShortCodeMax(oghamall.it.sms.message.addressing.translator.SenderPhoneNumberTranslatorTest)
changed conditional boundary → KILLED

7.7
Location : supports
Killed by : none
changed conditional boundary → NO_COVERAGE

8.8
Location : supports
Killed by : none
changed conditional boundary → TIMED_OUT

9.9
Location : supports
Killed by : none
negated conditional → NO_COVERAGE

10.10
Location : supports
Killed by : oghamall.it.sms.message.addressing.translator.SenderPhoneNumberTranslatorTest.translateShortCodeMax(oghamall.it.sms.message.addressing.translator.SenderPhoneNumberTranslatorTest)
negated conditional → KILLED

11.11
Location : supports
Killed by : none
negated conditional → TIMED_OUT

12.12
Location : supports
Killed by : none
negated conditional → SURVIVED

13.13
Location : supports
Killed by : none
negated conditional → TIMED_OUT

14.14
Location : supports
Killed by : none
negated conditional → NO_COVERAGE

15.15
Location : supports
Killed by : oghamall.it.sms.message.addressing.translator.SenderPhoneNumberTranslatorTest.translateNoNumber(oghamall.it.sms.message.addressing.translator.SenderPhoneNumberTranslatorTest)
negated conditional → KILLED

16.16
Location : supports
Killed by : none
negated conditional → SURVIVED

17.17
Location : supports
Killed by : oghamall.it.sms.message.addressing.translator.SenderPhoneNumberTranslatorTest.translateShortCodeMax(oghamall.it.sms.message.addressing.translator.SenderPhoneNumberTranslatorTest)
negated conditional → KILLED

18.18
Location : supports
Killed by : none
negated conditional → TIMED_OUT

19.19
Location : supports
Killed by : none
negated conditional → SURVIVED

20.20
Location : supports
Killed by : none
negated conditional → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT OGHAM