1
|
|
package fr.sii.ogham.core.message.content; |
2
|
|
|
3
|
|
import fr.sii.ogham.core.util.EqualsBuilder; |
4
|
|
import fr.sii.ogham.core.util.HashCodeBuilder; |
5
|
|
|
6
|
|
/** |
7
|
|
* Represent a string content. This implementation is the most basic one. It |
8
|
|
* just wraps a string into a {@link Content}. |
9
|
|
* |
10
|
|
* @author Aurélien Baudet |
11
|
|
* |
12
|
|
*/ |
13
|
|
public class StringContent implements MayHaveStringContent, UpdatableStringContent { |
14
|
|
/** |
15
|
|
* The content as string |
16
|
|
*/ |
17
|
|
private String content; |
18
|
|
|
19
|
|
/** |
20
|
|
* Initialize the content with the string. |
21
|
|
* |
22
|
|
* @param content |
23
|
|
* the content value |
24
|
|
*/ |
25
|
|
public StringContent(String content) { |
26
|
|
super(); |
27
|
|
this.content = content; |
28
|
|
} |
29
|
|
|
30
|
|
@Override |
31
|
|
public String toString() { |
32
|
7
1. toString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → SURVIVED
2. toString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → NO_COVERAGE
3. toString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → TIMED_OUT
4. toString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → KILLED
5. toString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → KILLED
6. toString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → KILLED
7. toString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → KILLED
|
return content; |
33
|
|
} |
34
|
|
|
35
|
|
@Override |
36
|
|
public boolean canProvideString() { |
37
|
8
1. canProvideString : replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → SURVIVED
2. canProvideString : replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → NO_COVERAGE
3. canProvideString : replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → TIMED_OUT
4. canProvideString : replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → KILLED
5. canProvideString : replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → KILLED
6. canProvideString : replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → KILLED
7. canProvideString : replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → KILLED
8. canProvideString : replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → KILLED
|
return true; |
38
|
|
} |
39
|
|
|
40
|
|
@Override |
41
|
|
public String asString() { |
42
|
8
1. asString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → NO_COVERAGE
2. asString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → TIMED_OUT
3. asString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED
4. asString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED
5. asString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED
6. asString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED
7. asString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED
8. asString : replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED
|
return content; |
43
|
|
} |
44
|
|
|
45
|
|
@Override |
46
|
|
public void setStringContent(String content) { |
47
|
|
this.content = content; |
48
|
|
} |
49
|
|
|
50
|
|
@Override |
51
|
|
public int hashCode() { |
52
|
2
1. hashCode : replaced int return with 0 for fr/sii/ogham/core/message/content/StringContent::hashCode → NO_COVERAGE
2. hashCode : replaced int return with 0 for fr/sii/ogham/core/message/content/StringContent::hashCode → KILLED
|
return new HashCodeBuilder().append(content).hashCode(); |
53
|
|
} |
54
|
|
|
55
|
|
@Override |
56
|
|
public boolean equals(Object obj) { |
57
|
6
1. equals : replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::equals → NO_COVERAGE
2. equals : replaced boolean return with true for fr/sii/ogham/core/message/content/StringContent::equals → NO_COVERAGE
3. equals : replaced boolean return with true for fr/sii/ogham/core/message/content/StringContent::equals → SURVIVED
4. equals : replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::equals → KILLED
5. equals : replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::equals → KILLED
6. equals : replaced boolean return with true for fr/sii/ogham/core/message/content/StringContent::equals → KILLED
|
return new EqualsBuilder(this, obj).appendFields("content").isEqual(); |
58
|
|
} |
59
|
|
} |
| | Mutations |
32 |
|
1.1 Location : toString Killed by : none replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → SURVIVED 2.2 Location : toString Killed by : oghamall.it.html.translator.JsoupInlineCssTranslatorTest.externalStyles(oghamall.it.html.translator.JsoupInlineCssTranslatorTest) replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → KILLED 3.3 Location : toString Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledAndAutoGuessEnabledAndGsm7bitEncodingConfiguredAndLongMessageWithUnsupportedCharactersShouldFailIndicatingThatMessageCantBeSplit(oghamcloudhopper.it.PartialConfigurationTest) replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → KILLED 4.4 Location : toString Killed by : none replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → NO_COVERAGE 5.5 Location : toString Killed by : none replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → TIMED_OUT 6.6 Location : toString Killed by : oghamovh.it.OvhSmsTest.phoneNumberConversion(oghamovh.it.OvhSmsTest) replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → KILLED 7.7 Location : toString Killed by : oghamcore.ut.email.subject.provider.TextPrefixSubjectProviderTest.noPrefix(oghamcore.ut.email.subject.provider.TextPrefixSubjectProviderTest) replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::toString → KILLED
|
37 |
|
1.1 Location : canProvideString Killed by : none replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → SURVIVED 2.2 Location : canProvideString Killed by : oghamfremarker.it.FreeMarkerParserTest.nested(oghamfremarker.it.FreeMarkerParserTest) replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → KILLED 3.3 Location : canProvideString Killed by : none replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → TIMED_OUT 4.4 Location : canProvideString Killed by : none replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → NO_COVERAGE 5.5 Location : canProvideString Killed by : oghamthymeleafv3.it.resolver.StringResourceResolverTest.text(oghamthymeleafv3.it.resolver.StringResourceResolverTest) replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → KILLED 6.6 Location : canProvideString Killed by : oghamall.it.html.translator.JsoupInlineCssTranslatorTest.unreadableCss(oghamall.it.html.translator.JsoupInlineCssTranslatorTest) replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → KILLED 7.7 Location : canProvideString Killed by : oghamcore.ut.email.subject.provider.HtmlTitleSubjectProviderTest.withTitle(oghamcore.ut.email.subject.provider.HtmlTitleSubjectProviderTest) replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → KILLED 8.8 Location : canProvideString Killed by : oghamthymeleafv2.it.resolver.StringResourceResolverTest.text(oghamthymeleafv2.it.resolver.StringResourceResolverTest) replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::canProvideString → KILLED
|
42 |
|
1.1 Location : asString Killed by : none replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → NO_COVERAGE 2.2 Location : asString Killed by : none replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → TIMED_OUT 3.3 Location : asString Killed by : oghamcore.ut.email.subject.provider.HtmlTitleSubjectProviderTest.withTitle(oghamcore.ut.email.subject.provider.HtmlTitleSubjectProviderTest) replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED 4.4 Location : asString Killed by : oghamthymeleafv2.it.resolver.StringResourceResolverTest.text(oghamthymeleafv2.it.resolver.StringResourceResolverTest) replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED 5.5 Location : asString Killed by : oghamfremarker.it.FreeMarkerParserTest.nested(oghamfremarker.it.FreeMarkerParserTest) replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED 6.6 Location : asString Killed by : oghamall.it.html.translator.JsoupInlineCssTranslatorTest.unreadableCss(oghamall.it.html.translator.JsoupInlineCssTranslatorTest) replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED 7.7 Location : asString Killed by : oghamthymeleafv3.it.resolver.StringResourceResolverTest.text(oghamthymeleafv3.it.resolver.StringResourceResolverTest) replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED 8.8 Location : asString Killed by : oghamjavamail.it.JavaMailStructureTest.plainTextBody(oghamjavamail.it.JavaMailStructureTest) replaced return value with "" for fr/sii/ogham/core/message/content/StringContent::asString → KILLED
|
52 |
|
1.1 Location : hashCode Killed by : none replaced int return with 0 for fr/sii/ogham/core/message/content/StringContent::hashCode → NO_COVERAGE 2.2 Location : hashCode Killed by : oghamcore.ut.core.EqualsTest.stringContent(oghamcore.ut.core.EqualsTest) replaced int return with 0 for fr/sii/ogham/core/message/content/StringContent::hashCode → KILLED
|
57 |
|
1.1 Location : equals Killed by : oghamall.it.sms.SmsCustomImplTest.simple(oghamall.it.sms.SmsCustomImplTest) replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::equals → KILLED 2.2 Location : equals Killed by : oghamcore.ut.email.subject.provider.MultiContentSubjectProviderTest.noneAndEmpty(oghamcore.ut.email.subject.provider.MultiContentSubjectProviderTest) replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::equals → KILLED 3.3 Location : equals Killed by : none replaced boolean return with false for fr/sii/ogham/core/message/content/StringContent::equals → NO_COVERAGE 4.4 Location : equals Killed by : none replaced boolean return with true for fr/sii/ogham/core/message/content/StringContent::equals → NO_COVERAGE 5.5 Location : equals Killed by : none replaced boolean return with true for fr/sii/ogham/core/message/content/StringContent::equals → SURVIVED 6.6 Location : equals Killed by : oghamcore.ut.email.subject.provider.MultiContentSubjectProviderTest.noneAndNone(oghamcore.ut.email.subject.provider.MultiContentSubjectProviderTest) replaced boolean return with true for fr/sii/ogham/core/message/content/StringContent::equals → KILLED
|