OvhOptions.java

1
package fr.sii.ogham.sms.sender.impl.ovh;
2
3
/**
4
 * The optional parameters used to customize OVH SMS:
5
 * <ul>
6
 * <li>noStop: do not display STOP footer. Disabled by default</li>
7
 * <li>tag: mark the sent SMS with a tag (20 characters max)</li>
8
 * <li>smsCoding: the SMS encoding. 7bits by default. If you change to Unicode,
9
 * the message limit will be 70 instead of 160.</li>
10
 * </ul>
11
 * 
12
 * @author Aurélien Baudet
13
 *
14
 */
15
public class OvhOptions {
16
	/**
17
	 * Option to skip displaying STOP message
18
	 */
19
	private int noStop;
20
21
	/**
22
	 * Option to tag the sent SMS (20 characters max)
23
	 */
24
	private String tag;
25
26
	/**
27
	 * Option to select encoding
28
	 */
29
	private SmsCoding smsCoding;
30
31
	public OvhOptions() {
32
		this(true, null, null);
33
	}
34
35
	public OvhOptions(boolean noStop, String tag, SmsCoding smsCoding) {
36
		super();
37
		this.noStop = toInt(noStop);
38
		this.tag = tag;
39
		this.smsCoding = smsCoding;
40
	}
41
42
	public int getNoStop() {
43 2 1. getNoStop : replaced int return with 0 for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getNoStop → NO_COVERAGE
2. getNoStop : replaced int return with 0 for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getNoStop → KILLED
		return noStop;
44
	}
45
46
	public String getTag() {
47 2 1. getTag : replaced return value with "" for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getTag → NO_COVERAGE
2. getTag : replaced return value with "" for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getTag → TIMED_OUT
		return tag;
48
	}
49
50
	public SmsCoding getSmsCoding() {
51 2 1. getSmsCoding : replaced return value with null for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getSmsCoding → NO_COVERAGE
2. getSmsCoding : replaced return value with null for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getSmsCoding → KILLED
		return smsCoding;
52
	}
53
54
	public void setNoStop(boolean noStop) {
55
		this.noStop = toInt(noStop);
56
	}
57
58
	public void setTag(String tag) {
59
		this.tag = tag;
60
	}
61
62
	public void setSmsCoding(SmsCoding smsCoding) {
63
		this.smsCoding = smsCoding;
64
	}
65
66
	private static int toInt(boolean noStop) {
67 2 1. toInt : negated conditional → NO_COVERAGE
2. toInt : negated conditional → KILLED
		return noStop ? 1 : 0;
68
	}
69
}

Mutations

43

1.1
Location : getNoStop
Killed by : oghamovh.it.OvhSmsTest.phoneNumberConversion(oghamovh.it.OvhSmsTest)
replaced int return with 0 for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getNoStop → KILLED

2.2
Location : getNoStop
Killed by : none
replaced int return with 0 for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getNoStop → NO_COVERAGE

47

1.1
Location : getTag
Killed by : none
replaced return value with "" for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getTag → TIMED_OUT

2.2
Location : getTag
Killed by : none
replaced return value with "" for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getTag → NO_COVERAGE

51

1.1
Location : getSmsCoding
Killed by : none
replaced return value with null for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getSmsCoding → NO_COVERAGE

2.2
Location : getSmsCoding
Killed by : oghamovh.it.SmsCodingTest.fixedValue(oghamovh.it.SmsCodingTest)
replaced return value with null for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getSmsCoding → KILLED

67

1.1
Location : toInt
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : toInt
Killed by : oghamovh.it.OvhSmsTest.phoneNumberConversion(oghamovh.it.OvhSmsTest)
negated conditional → KILLED

Active mutators

Tests examined


Report generated by PIT OGHAM