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 1 1. getNoStop : replaced int return with 0 for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getNoStop → NO_COVERAGE
		return noStop;
44
	}
45
46
	public String getTag() {
47 1 1. getTag : replaced return value with "" for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getTag → NO_COVERAGE
		return tag;
48
	}
49
50
	public SmsCoding getSmsCoding() {
51 1 1. getSmsCoding : replaced return value with null for fr/sii/ogham/sms/sender/impl/ovh/OvhOptions::getSmsCoding → NO_COVERAGE
		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 1 1. toInt : negated conditional → NO_COVERAGE
		return noStop ? 1 : 0;
68
	}
69
}

Mutations

43

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

47

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

51

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

67

1.1
Location : toInt
Killed by :
negated conditional → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.13.1