public class BodyMatchers extends Object
Modifier and Type | Field and Description |
---|---|
protected List<BodyMatcher> |
matchers |
Constructor and Description |
---|
BodyMatchers() |
protected final List<BodyMatcher> matchers
public void jsonPath(String path, MatchingTypeValue matchingType)
public void xPath(String xPath, MatchingTypeValue matchingTypeValue)
jsonPath(java.lang.String, org.springframework.cloud.contract.spec.internal.MatchingTypeValue)
,
added for logical coherence in xml.xPath
- the xPath used to find the element to matchmatchingTypeValue
- to match the element found by the xPath against@Deprecated public List<BodyMatcher> jsonPathMatchers()
matchers()
public boolean hasMatchers()
public List<BodyMatcher> matchers()
public MatchingTypeValue byDate()
public MatchingTypeValue byTime()
public MatchingTypeValue byTimestamp()
public RegexMatchingTypeValue byRegex(String regex)
public RegexMatchingTypeValue byRegex(RegexProperty regex)
public RegexMatchingTypeValue byRegex(Pattern regex)
public MatchingTypeValue byEquality()
public MatchingTypeValue byType(Consumer<MatchingTypeValueHolder> consumer)
consumer
- function to manipulate the output messagepublic MatchingTypeValue byType(@DelegatesTo(value=MatchingTypeValueHolder.class) groovy.lang.Closure consumer)
consumer
- function to manipulate the output messageCopyright © 2016–2019 Spring. All rights reserved.