use of org.springframework.cloud.contract.verifier.util.xml.XmlToXPathsConverter in project spring-cloud-contract by spring-cloud.
the class XmlBodyVerificationBuilder method addXmlResponseBodyCheck.
void addXmlResponseBodyCheck(BlockBuilder blockBuilder, Object responseBody, BodyMatchers bodyMatchers, String responseString, boolean shouldCommentOutBDDBlocks) {
addXmlProcessingLines(blockBuilder, responseString);
Object processedBody = XmlToXPathsConverter.removeMatchingXPaths(responseBody, bodyMatchers);
List<BodyMatcher> matchers = new XmlToXPathsConverter().mapToMatchers(processedBody);
if (bodyMatchers != null && bodyMatchers.hasMatchers()) {
matchers.addAll(bodyMatchers.matchers());
}
addBodyMatchingBlock(matchers, blockBuilder, responseBody, shouldCommentOutBDDBlocks);
}
Aggregations