org.springframework.test.util.XpathExpectationsHelper Java Examples

The following examples show how to use org.springframework.test.util.XpathExpectationsHelper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XpathAssertions.java    From spring-analysis-note with MIT License 5 votes vote down vote up
private static XpathExpectationsHelper initXpathHelper(
		String expression, @Nullable Map<String, String> namespaces, Object[] args) {

	try {
		return new XpathExpectationsHelper(expression, namespaces, args);
	}
	catch (XPathExpressionException ex) {
		throw new AssertionError("XML parsing error", ex);
	}
}
 
Example #2
Source File: XpathAssertions.java    From java-technology-stack with MIT License 5 votes vote down vote up
private static XpathExpectationsHelper initXpathHelper(
		String expression, @Nullable Map<String, String> namespaces, Object[] args) {

	try {
		return new XpathExpectationsHelper(expression, namespaces, args);
	}
	catch (XPathExpressionException ex) {
		throw new AssertionError("XML parsing error", ex);
	}
}
 
Example #3
Source File: XpathResultMatchers.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Protected constructor, not for direct instantiation. Use
 * {@link MockMvcResultMatchers#xpath(String, Object...)} or
 * {@link MockMvcResultMatchers#xpath(String, Map, Object...)}.
 * @param expression the XPath expression
 * @param namespaces the XML namespaces referenced in the XPath expression, or {@code null}
 * @param args arguments to parameterize the XPath expression with using the
 * formatting specifiers defined in {@link String#format(String, Object...)}
 */
protected XpathResultMatchers(String expression, @Nullable Map<String, String> namespaces, Object ... args)
		throws XPathExpressionException {

	this.xpathHelper = new XpathExpectationsHelper(expression, namespaces, args);
}
 
Example #4
Source File: XpathRequestMatchers.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Class constructor, not for direct instantiation. Use
 * {@link MockRestRequestMatchers#xpath(String, Object...)} or
 * {@link MockRestRequestMatchers#xpath(String, Map, Object...)}.
 * @param expression the XPath expression
 * @param namespaces the XML namespaces referenced in the XPath expression, or {@code null}
 * @param args arguments to parameterize the XPath expression with using the
 * formatting specifiers defined in {@link String#format(String, Object...)}
 * @throws XPathExpressionException if expression compilation failed
 */
protected XpathRequestMatchers(String expression, @Nullable Map<String, String> namespaces, Object ... args)
		throws XPathExpressionException {

	this.xpathHelper = new XpathExpectationsHelper(expression, namespaces, args);
}
 
Example #5
Source File: XpathResultMatchers.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Protected constructor, not for direct instantiation. Use
 * {@link MockMvcResultMatchers#xpath(String, Object...)} or
 * {@link MockMvcResultMatchers#xpath(String, Map, Object...)}.
 * @param expression the XPath expression
 * @param namespaces the XML namespaces referenced in the XPath expression, or {@code null}
 * @param args arguments to parameterize the XPath expression with using the
 * formatting specifiers defined in {@link String#format(String, Object...)}
 */
protected XpathResultMatchers(String expression, @Nullable Map<String, String> namespaces, Object ... args)
		throws XPathExpressionException {

	this.xpathHelper = new XpathExpectationsHelper(expression, namespaces, args);
}
 
Example #6
Source File: XpathRequestMatchers.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Class constructor, not for direct instantiation. Use
 * {@link MockRestRequestMatchers#xpath(String, Object...)} or
 * {@link MockRestRequestMatchers#xpath(String, Map, Object...)}.
 * @param expression the XPath expression
 * @param namespaces the XML namespaces referenced in the XPath expression, or {@code null}
 * @param args arguments to parameterize the XPath expression with using the
 * formatting specifiers defined in {@link String#format(String, Object...)}
 * @throws XPathExpressionException if expression compilation failed
 */
protected XpathRequestMatchers(String expression, @Nullable Map<String, String> namespaces, Object ... args)
		throws XPathExpressionException {

	this.xpathHelper = new XpathExpectationsHelper(expression, namespaces, args);
}
 
Example #7
Source File: XpathResultMatchers.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Protected constructor, not for direct instantiation. Use
 * {@link MockMvcResultMatchers#xpath(String, Object...)} or
 * {@link MockMvcResultMatchers#xpath(String, Map, Object...)}.
 * @param expression the XPath expression
 * @param namespaces XML namespaces referenced in the XPath expression, or {@code null}
 * @param args arguments to parameterize the XPath expression with using the
 * formatting specifiers defined in {@link String#format(String, Object...)}
 */
protected XpathResultMatchers(String expression, Map<String, String> namespaces, Object ... args)
		throws XPathExpressionException {

	this.xpathHelper = new XpathExpectationsHelper(expression, namespaces, args);
}
 
Example #8
Source File: XpathRequestMatchers.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Class constructor, not for direct instantiation. Use
 * {@link MockRestRequestMatchers#xpath(String, Object...)} or
 * {@link MockRestRequestMatchers#xpath(String, Map, Object...)}.
 *
 * @param expression the XPath expression
 * @param namespaces XML namespaces referenced in the XPath expression, or {@code null}
 * @param args arguments to parameterize the XPath expression with using the
 * formatting specifiers defined in {@link String#format(String, Object...)}
 *
 * @throws XPathExpressionException
 */
protected XpathRequestMatchers(String expression, Map<String, String> namespaces, Object ... args)
		throws XPathExpressionException {

	this.xpathHelper = new XpathExpectationsHelper(expression, namespaces, args);
}