PartWithContext.java

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 ogham.testing.jakarta.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 1 1. evaluate : replaced return value with "" for fr/sii/ogham/testing/assertion/email/PartWithContext::evaluate → NO_COVERAGE
		return parent.evaluate(result);
24
	}
25
	
26
	public Part getPart() {
27 1 1. getPart : replaced return value with null for fr/sii/ogham/testing/assertion/email/PartWithContext::getPart → NO_COVERAGE
		return part;
28
	}
29
}

Mutations

23

1.1
Location : evaluate
Killed by :
replaced return value with "" for fr/sii/ogham/testing/assertion/email/PartWithContext::evaluate → NO_COVERAGE

27

1.1
Location : getPart
Killed by :
replaced return value with null for fr/sii/ogham/testing/assertion/email/PartWithContext::getPart → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.13.1