WireMockMatchers.java

1
package fr.sii.ogham.testing.assertion.wiremock;
2
3
import org.w3c.dom.Document;
4
5
import com.github.tomakehurst.wiremock.client.WireMock;
6
7
import fr.sii.ogham.testing.assertion.util.HtmlUtils;
8
9
/**
10
 * Additional matchers for {@link WireMock}.
11
 * 
12
 * @author Aurélien Baudet
13
 *
14
 */
15
public final class WireMockMatchers {
16
17
	/**
18
	 * Check if the HTML is similar to the expected. The HTML strings are parsed
19
	 * into {@link Document}s. Two documents are considered to be "similar" if
20
	 * they contain the same elements and attributes regardless of order.
21
	 * 
22
	 * <p>
23
	 * See {@link HtmlUtils} for more information about "similar" HTML.
24
	 * 
25
	 * <p>
26
	 * NOTE: {@link WireMock#equalToXml(String)} does an identical check.
27
	 * 
28
	 * @param expected
29
	 *            the expected HTML
30
	 * @return the WireMock matcher
31
	 */
32
	public static SimilarHtmlPattern similarHtml(String expected) {
33 1 1. similarHtml : replaced return value with null for fr/sii/ogham/testing/assertion/wiremock/WireMockMatchers::similarHtml → NO_COVERAGE
		return new SimilarHtmlPattern(expected);
34
	}
35
36
	private WireMockMatchers() {
37
		super();
38
	}
39
}

Mutations

33

1.1
Location : similarHtml
Killed by : none
replaced return value with null for fr/sii/ogham/testing/assertion/wiremock/WireMockMatchers::similarHtml → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT OGHAM