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 java.util.List; | |
7 | ||
8 | import javax.mail.internet.InternetAddress; | |
9 | ||
10 | import fr.sii.ogham.testing.assertion.context.Context; | |
11 | ||
12 | public class AddressesWithContext implements Context { | |
13 | private final List<InternetAddress> addresses; | |
14 | private final String field; | |
15 | private final Context parent; | |
16 | | |
17 | public AddressesWithContext(List<InternetAddress> addresses, String field, Context parent) { | |
18 | super(); | |
19 | this.addresses = addresses; | |
20 | this.field = field; | |
21 | this.parent = parent; | |
22 | } | |
23 | | |
24 | public String evaluate(String template) { | |
25 | String result = template.replaceAll(quote("${fieldName}"), quoteReplacement(field)); | |
26 |
3
1. evaluate : replaced return value with "" for fr/sii/ogham/testing/assertion/email/AddressesWithContext::evaluate → SURVIVED 2. evaluate : replaced return value with "" for fr/sii/ogham/testing/assertion/email/AddressesWithContext::evaluate → NO_COVERAGE 3. evaluate : replaced return value with "" for fr/sii/ogham/testing/assertion/email/AddressesWithContext::evaluate → KILLED |
return parent.evaluate(result); |
27 | } | |
28 | | |
29 | public List<InternetAddress> getAddresses() { | |
30 |
4
1. getAddresses : replaced return value with Collections.emptyList for fr/sii/ogham/testing/assertion/email/AddressesWithContext::getAddresses → NO_COVERAGE 2. getAddresses : replaced return value with Collections.emptyList for fr/sii/ogham/testing/assertion/email/AddressesWithContext::getAddresses → KILLED 3. getAddresses : replaced return value with Collections.emptyList for fr/sii/ogham/testing/assertion/email/AddressesWithContext::getAddresses → KILLED 4. getAddresses : replaced return value with Collections.emptyList for fr/sii/ogham/testing/assertion/email/AddressesWithContext::getAddresses → KILLED |
return addresses; |
31 | } | |
32 | | |
33 | } | |
Mutations | ||
26 |
1.1 2.2 3.3 |
|
30 |
1.1 2.2 3.3 4.4 |