Response.java

1
package fr.sii.ogham.sms.util.http;
2
3
4
/**
5
 * Simple abstraction of the HTTP response. It just contains the useful
6
 * information (response body as string and http status).
7
 * 
8
 * @author Aurélien Baudet
9
 *
10
 */
11
public class Response {
12
	/**
13
	 * The HTTP status
14
	 */
15
	private final HttpStatus status;
16
17
	/**
18
	 * The response body directly as String
19
	 */
20
	private final String body;
21
22
	public Response(int status, String body) {
23
		this(HttpStatus.valueOf(status), body);
24
	}
25
26
	public Response(HttpStatus status, String body) {
27
		super();
28
		this.status = status;
29
		this.body = body;
30
	}
31
32
	public HttpStatus getStatus() {
33 2 1. getStatus : replaced return value with null for fr/sii/ogham/sms/util/http/Response::getStatus → NO_COVERAGE
2. getStatus : replaced return value with null for fr/sii/ogham/sms/util/http/Response::getStatus → KILLED
		return status;
34
	}
35
36
	public String getBody() {
37 2 1. getBody : replaced return value with "" for fr/sii/ogham/sms/util/http/Response::getBody → NO_COVERAGE
2. getBody : replaced return value with "" for fr/sii/ogham/sms/util/http/Response::getBody → KILLED
		return body;
38
	}
39
}

Mutations

33

1.1
Location : getStatus
Killed by : oghamovh.it.OvhSmsTest.phoneNumberConversion(oghamovh.it.OvhSmsTest)
replaced return value with null for fr/sii/ogham/sms/util/http/Response::getStatus → KILLED

2.2
Location : getStatus
Killed by : none
replaced return value with null for fr/sii/ogham/sms/util/http/Response::getStatus → NO_COVERAGE

37

1.1
Location : getBody
Killed by : none
replaced return value with "" for fr/sii/ogham/sms/util/http/Response::getBody → NO_COVERAGE

2.2
Location : getBody
Killed by : oghamovh.it.OvhSmsTest.phoneNumberConversion(oghamovh.it.OvhSmsTest)
replaced return value with "" for fr/sii/ogham/sms/util/http/Response::getBody → KILLED

Active mutators

Tests examined


Report generated by PIT OGHAM