public class HoverflyMatchers
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static RequestFieldMatcher |
any()
Create a matcher that matches on any value
|
static RequestFieldMatcher |
contains(java.lang.String value)
Create a matcher that matches on a string containing the given value
|
static RequestFieldMatcher |
endsWith(java.lang.String value)
Create a matcher that matches on a string post-fixed with the given value
|
static RequestFieldMatcher |
equalsTo(java.lang.Object value)
Create a matcher that exactly equals to the String value of the given object
|
static RequestFieldMatcher |
equalsToJson(HttpBodyConverter converter)
Create a matcher that matches on JSON serialized from a JAVA object by
HttpBodyConverter |
static RequestFieldMatcher |
equalsToJson(java.lang.String value)
Create a matcher that matches on the given JSON
|
static RequestFieldMatcher |
equalsToXml(HttpBodyConverter converter)
Create a matcher that matches on XML serialized from a JAVA object by
HttpBodyConverter |
static RequestFieldMatcher |
equalsToXml(java.lang.String value)
Create a matcher that matches on the given XML
|
static RequestFieldMatcher |
matches(java.lang.String value)
Create a matcher that matches a GLOB pattern.
|
static RequestFieldMatcher |
matchesGoRegex(java.lang.String regexPattern)
Create a matcher that matches a Golang regex pattern.
|
static RequestFieldMatcher |
matchesJsonPath(java.lang.String expression)
Create a matcher that matches on the given JsonPath expression
|
static RequestFieldMatcher |
matchesPartialJson(HttpBodyConverter converter)
Create a matcher that matches on a partial JSON document serialized from a JAVA object by
HttpBodyConverter |
static RequestFieldMatcher |
matchesPartialJson(java.lang.String value)
Create a matcher that matches on the given partial JSON document
|
static RequestFieldMatcher |
matchesXPath(java.lang.String expression)
Create a matcher that matches on the given XPath expression
|
static RequestFieldMatcher |
startsWith(java.lang.String value)
Create a matcher that matches on a string prefixed with the given value
|
public static RequestFieldMatcher equalsTo(java.lang.Object value)
value - the value to match onRequestFieldMatcherpublic static RequestFieldMatcher matches(java.lang.String value)
HoverflyMatchers.matches("api-v*.test-svc.*")value - the GLOB pattern, use the wildcard character '*' to match any charactersRequestFieldMatcherpublic static RequestFieldMatcher matchesGoRegex(java.lang.String regexPattern)
regexPattern - the Golang regex patternRequestFieldMatcherpublic static RequestFieldMatcher startsWith(java.lang.String value)
value - the value to start withRequestFieldMatcherpublic static RequestFieldMatcher endsWith(java.lang.String value)
value - the value to end withRequestFieldMatcherpublic static RequestFieldMatcher contains(java.lang.String value)
value - the value to containRequestFieldMatcherpublic static RequestFieldMatcher any()
RequestFieldMatcherpublic static RequestFieldMatcher equalsToJson(java.lang.String value)
value - the JSON string valueRequestFieldMatcherpublic static RequestFieldMatcher equalsToJson(HttpBodyConverter converter)
HttpBodyConverterconverter - the HttpBodyConverter with an object to be serialized to JSONRequestFieldMatcher that includes jsonMatchpublic static RequestFieldMatcher matchesPartialJson(java.lang.String value)
value - the JSON string valueRequestFieldMatcherpublic static RequestFieldMatcher matchesPartialJson(HttpBodyConverter converter)
HttpBodyConverterconverter - the HttpBodyConverter with an object to be serialized to JSONRequestFieldMatcherpublic static RequestFieldMatcher matchesJsonPath(java.lang.String expression)
expression - the JsonPath expressionRequestFieldMatcherpublic static RequestFieldMatcher equalsToXml(java.lang.String value)
value - the XML string valueRequestFieldMatcherpublic static RequestFieldMatcher equalsToXml(HttpBodyConverter converter)
HttpBodyConverterconverter - the HttpBodyConverter with an object to be serialized to XMLRequestFieldMatcher that includes xmlMatchpublic static RequestFieldMatcher matchesXPath(java.lang.String expression)
expression - the XPath expressionRequestFieldMatcher