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

Mutations

24

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

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

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

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

5.5
Location : supports
Killed by : oghamall.it.sms.message.addressing.translator.ReceiverPhoneNumberTranslatorTest.translateInternational(oghamall.it.sms.message.addressing.translator.ReceiverPhoneNumberTranslatorTest)
negated conditional → KILLED

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

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

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

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

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

11.11
Location : supports
Killed by : oghamall.it.sms.message.addressing.translator.ReceiverPhoneNumberTranslatorTest.translateInternational(oghamall.it.sms.message.addressing.translator.ReceiverPhoneNumberTranslatorTest)
negated conditional → KILLED

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

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

14.14
Location : supports
Killed by : oghamall.it.sms.message.addressing.translator.ReceiverPhoneNumberTranslatorTest.translateInternational(oghamall.it.sms.message.addressing.translator.ReceiverPhoneNumberTranslatorTest)
negated conditional → KILLED

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

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

Active mutators

Tests examined


Report generated by PIT OGHAM