| 1 | package fr.sii.ogham.testing.assertion.email; | |
| 2 | ||
| 3 | import static java.util.regex.Matcher.quoteReplacement; | |
| 4 | import static java.util.regex.Pattern.quote; | |
| 5 | ||
| 6 | import javax.mail.Part; | |
| 7 | ||
| 8 | import fr.sii.ogham.testing.assertion.context.Context; | |
| 9 | ||
| 10 | public class PartWithContext implements Context { | |
| 11 | private final Part part; | |
| 12 | private final String partName; | |
| 13 | private final Context parent; | |
| 14 | public PartWithContext(Part part, String partName, Context parent) { | |
| 15 | super(); | |
| 16 | this.part = part; | |
| 17 | this.partName = partName; | |
| 18 | this.parent = parent; | |
| 19 | } | |
| 20 | | |
| 21 | public String evaluate(String template) { | |
| 22 | String result = template.replaceAll(quote("${partName}"), quoteReplacement(partName)); | |
| 23 |
4
1. evaluate : replaced return value with "" for fr/sii/ogham/testing/assertion/email/PartWithContext::evaluate → SURVIVED 2. evaluate : replaced return value with "" for fr/sii/ogham/testing/assertion/email/PartWithContext::evaluate → NO_COVERAGE 3. evaluate : replaced return value with "" for fr/sii/ogham/testing/assertion/email/PartWithContext::evaluate → TIMED_OUT 4. evaluate : replaced return value with "" for fr/sii/ogham/testing/assertion/email/PartWithContext::evaluate → KILLED |
return parent.evaluate(result); |
| 24 | } | |
| 25 | | |
| 26 | public Part getPart() { | |
| 27 |
5
1. getPart : replaced return value with null for fr/sii/ogham/testing/assertion/email/PartWithContext::getPart → NO_COVERAGE 2. getPart : replaced return value with null for fr/sii/ogham/testing/assertion/email/PartWithContext::getPart → TIMED_OUT 3. getPart : replaced return value with null for fr/sii/ogham/testing/assertion/email/PartWithContext::getPart → KILLED 4. getPart : replaced return value with null for fr/sii/ogham/testing/assertion/email/PartWithContext::getPart → KILLED 5. getPart : replaced return value with null for fr/sii/ogham/testing/assertion/email/PartWithContext::getPart → KILLED |
return part; |
| 28 | } | |
| 29 | } | |
Mutations | ||
| 23 |
1.1 2.2 3.3 4.4 |
|
| 27 |
1.1 2.2 3.3 4.4 5.5 |