1 | package fr.sii.ogham.core.resource.path; | |
2 | ||
3 | import fr.sii.ogham.core.CoreConstants; | |
4 | ||
5 | public class ResolvedString implements ResolvedPath { | |
6 | private final String content; | |
7 | private final String lookup; | |
8 | ||
9 | public ResolvedString(String content) { | |
10 | this(content, CoreConstants.STRING_LOOKUPS.get(0)); | |
11 | } | |
12 | ||
13 | public ResolvedString(String content, String lookup) { | |
14 | super(); | |
15 | this.content = content; | |
16 | this.lookup = lookup; | |
17 | } | |
18 | ||
19 | public String getContent() { | |
20 |
2
1. getContent : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedString::getContent → NO_COVERAGE 2. getContent : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedString::getContent → KILLED |
return content; |
21 | } | |
22 | ||
23 | @Override | |
24 | public String getOriginalPath() { | |
25 | // This is needed due to some template engines that only support strings | |
26 | // for template path/name. | |
27 | // At some point, ResolvedString is lost and only the original path is | |
28 | // used. | |
29 | // To be able to get a ResolvedString again, a lookup must be used. | |
30 |
4
1. getOriginalPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedString::getOriginalPath → NO_COVERAGE 2. getOriginalPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedString::getOriginalPath → KILLED 3. getOriginalPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedString::getOriginalPath → KILLED 4. getOriginalPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedString::getOriginalPath → KILLED |
return lookup + content; |
31 | } | |
32 | ||
33 | @Override | |
34 | public String getResolvedPath() { | |
35 |
2
1. getResolvedPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedString::getResolvedPath → SURVIVED 2. getResolvedPath : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedString::getResolvedPath → NO_COVERAGE |
return getContent(); |
36 | } | |
37 | ||
38 | @Override | |
39 | public String getLookup() { | |
40 |
1
1. getLookup : replaced return value with "" for fr/sii/ogham/core/resource/path/ResolvedString::getLookup → NO_COVERAGE |
return lookup; |
41 | } | |
42 | } | |
Mutations | ||
20 |
1.1 2.2 |
|
30 |
1.1 2.2 3.3 4.4 |
|
35 |
1.1 2.2 |
|
40 |
1.1 |