ResolvedResourcePath.java

1
package fr.sii.ogham.core.resource.path;
2
3
import fr.sii.ogham.core.util.EqualsBuilder;
4
import fr.sii.ogham.core.util.HashCodeBuilder;
5
6
/**
7
 * Provides a link between a resource path, its recognized lookup and its
8
 * resolved value.
9
 * 
10
 * @author Cyril Dejonghe
11
 *
12
 */
13
public class ResolvedResourcePath implements ResolvedPath {
14
	/**
15
	 * The entire path of the resource, OGHAM style, lookup included.
16
	 */
17
	private final ResourcePath originalPath;
18
19
	/**
20
	 * The lookup corresponding to the resource type / protocol..
21
	 */
22
	private final String lookup;
23
24
	/**
25
	 * The resolved path of the resource. Used by the resolver.
26
	 */
27
	private final String resolvedPath;
28
29
	public ResolvedResourcePath(ResourcePath originalPath, String lookup, String resolvedPath) {
30
		super();
31
		this.originalPath = originalPath;
32
		this.lookup = lookup;
33
		this.resolvedPath = resolvedPath;
34
	}
35
36
	public String getOriginalPath() {
37 4 1. getOriginalPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getOriginalPath → SURVIVED
2. getOriginalPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getOriginalPath → NO_COVERAGE
3. getOriginalPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getOriginalPath → TIMED_OUT
4. getOriginalPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getOriginalPath → KILLED
		return originalPath.getOriginalPath();
38
	}
39
40
	public String getLookup() {
41 2 1. getLookup : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getLookup → NO_COVERAGE
2. getLookup : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getLookup → SURVIVED
		return lookup;
42
	}
43
44
	public String getResolvedPath() {
45 7 1. getResolvedPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → NO_COVERAGE
2. getResolvedPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → TIMED_OUT
3. getResolvedPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → KILLED
4. getResolvedPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → KILLED
5. getResolvedPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → KILLED
6. getResolvedPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → KILLED
7. getResolvedPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → KILLED
		return resolvedPath;
46
	}
47
48
49
	@Override
50
	public int hashCode() {
51 1 1. hashCode : replaced int return with 0 for fr/sii/ogham/core/resource/path/ResolvedResourcePath::hashCode → NO_COVERAGE
		return new HashCodeBuilder().append(originalPath, lookup, resolvedPath).hashCode();
52
	}
53
54
	@Override
55
	public boolean equals(Object obj) {
56 4 1. equals : replaced boolean return with false for fr/sii/ogham/core/resource/path/ResolvedResourcePath::equals → NO_COVERAGE
2. equals : replaced boolean return with true for fr/sii/ogham/core/resource/path/ResolvedResourcePath::equals → NO_COVERAGE
3. equals : replaced boolean return with false for fr/sii/ogham/core/resource/path/ResolvedResourcePath::equals → KILLED
4. equals : replaced boolean return with true for fr/sii/ogham/core/resource/path/ResolvedResourcePath::equals → KILLED
		return new EqualsBuilder(this, obj).appendFields("originalPath", "lookup", "resolvedPath").isEqual();
57
	}
58
	
59
60
	@Override
61
	public String toString() {
62
		StringBuilder builder = new StringBuilder();
63
		builder.append("'").append(resolvedPath).append("' (resolved from ").append(originalPath).append(")");
64 3 1. toString : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::toString → SURVIVED
2. toString : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::toString → NO_COVERAGE
3. toString : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::toString → TIMED_OUT
		return builder.toString();
65
	}
66
}

Mutations

37

1.1
Location : getOriginalPath
Killed by : none
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getOriginalPath → SURVIVED

2.2
Location : getOriginalPath
Killed by : none
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getOriginalPath → TIMED_OUT

3.3
Location : getOriginalPath
Killed by : none
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getOriginalPath → NO_COVERAGE

4.4
Location : getOriginalPath
Killed by : oghamall.it.email.EmailMultiTemplateTest.withThymeleafOneVariantWithParsingError(oghamall.it.email.EmailMultiTemplateTest)
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getOriginalPath → KILLED

41

1.1
Location : getLookup
Killed by : none
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getLookup → NO_COVERAGE

2.2
Location : getLookup
Killed by : none
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getLookup → SURVIVED

45

1.1
Location : getResolvedPath
Killed by : oghamfremarker.it.FreeMarkerTemplateDetectorTest.text(oghamfremarker.it.FreeMarkerTemplateDetectorTest)
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → KILLED

2.2
Location : getResolvedPath
Killed by : oghamthymeleafv3.it.ThymeleafDetectorTest.foundButEmpty(oghamthymeleafv3.it.ThymeleafDetectorTest)
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → KILLED

3.3
Location : getResolvedPath
Killed by : oghamthymeleafv2.it.ThymeleafDetectorTest.foundButEmpty(oghamthymeleafv2.it.ThymeleafDetectorTest)
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → KILLED

4.4
Location : getResolvedPath
Killed by : none
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → TIMED_OUT

5.5
Location : getResolvedPath
Killed by : oghamcore.it.core.resource.resolver.FirstSupportingResolverTest.unknown(oghamcore.it.core.resource.resolver.FirstSupportingResolverTest)
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → KILLED

6.6
Location : getResolvedPath
Killed by : none
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → NO_COVERAGE

7.7
Location : getResolvedPath
Killed by : oghamall.it.html.translator.JsoupInlineCssTranslatorTest.unreadableCss(oghamall.it.html.translator.JsoupInlineCssTranslatorTest)
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::getResolvedPath → KILLED

51

1.1
Location : hashCode
Killed by : none
replaced int return with 0 for fr/sii/ogham/core/resource/path/ResolvedResourcePath::hashCode → NO_COVERAGE

56

1.1
Location : equals
Killed by : none
replaced boolean return with false for fr/sii/ogham/core/resource/path/ResolvedResourcePath::equals → NO_COVERAGE

2.2
Location : equals
Killed by : oghamfremarker.it.FreeMarkerTemplateDetectorTest.hasFtlExtensionButFileDoesntExistShouldNotBeAbleToParse(oghamfremarker.it.FreeMarkerTemplateDetectorTest)
replaced boolean return with false for fr/sii/ogham/core/resource/path/ResolvedResourcePath::equals → KILLED

3.3
Location : equals
Killed by : oghamfremarker.it.FreeMarkerTemplateDetectorTest.text(oghamfremarker.it.FreeMarkerTemplateDetectorTest)
replaced boolean return with true for fr/sii/ogham/core/resource/path/ResolvedResourcePath::equals → KILLED

4.4
Location : equals
Killed by : none
replaced boolean return with true for fr/sii/ogham/core/resource/path/ResolvedResourcePath::equals → NO_COVERAGE

64

1.1
Location : toString
Killed by : none
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::toString → SURVIVED

2.2
Location : toString
Killed by : none
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::toString → NO_COVERAGE

3.3
Location : toString
Killed by : none
replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedResourcePath::toString → TIMED_OUT

Active mutators

Tests examined


Report generated by PIT OGHAM