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 onRequestFieldMatcher
public static RequestFieldMatcher matches(java.lang.String value)
HoverflyMatchers.matches("api-v*.test-svc.*")
value
- the GLOB pattern, use the wildcard character '*' to match any charactersRequestFieldMatcher
public static RequestFieldMatcher matchesGoRegex(java.lang.String regexPattern)
regexPattern
- the Golang regex patternRequestFieldMatcher
public static RequestFieldMatcher startsWith(java.lang.String value)
value
- the value to start withRequestFieldMatcher
public static RequestFieldMatcher endsWith(java.lang.String value)
value
- the value to end withRequestFieldMatcher
public static RequestFieldMatcher contains(java.lang.String value)
value
- the value to containRequestFieldMatcher
public static RequestFieldMatcher any()
RequestFieldMatcher
public static RequestFieldMatcher equalsToJson(java.lang.String value)
value
- the JSON string valueRequestFieldMatcher
public static RequestFieldMatcher equalsToJson(HttpBodyConverter converter)
HttpBodyConverter
converter
- the HttpBodyConverter
with an object to be serialized to JSONRequestFieldMatcher
that includes jsonMatchpublic static RequestFieldMatcher matchesPartialJson(java.lang.String value)
value
- the JSON string valueRequestFieldMatcher
public static RequestFieldMatcher matchesPartialJson(HttpBodyConverter converter)
HttpBodyConverter
converter
- the HttpBodyConverter
with an object to be serialized to JSONRequestFieldMatcher
public static RequestFieldMatcher matchesJsonPath(java.lang.String expression)
expression
- the JsonPath expressionRequestFieldMatcher
public static RequestFieldMatcher equalsToXml(java.lang.String value)
value
- the XML string valueRequestFieldMatcher
public static RequestFieldMatcher equalsToXml(HttpBodyConverter converter)
HttpBodyConverter
converter
- the HttpBodyConverter
with an object to be serialized to XMLRequestFieldMatcher
that includes xmlMatchpublic static RequestFieldMatcher matchesXPath(java.lang.String expression)
expression
- the XPath expressionRequestFieldMatcher