|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2015 the original author or authors. |
|
|
|
* Copyright 2002-2016 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
@ -46,12 +46,10 @@ public class XpathRequestMatchers { |
|
|
|
* Class constructor, not for direct instantiation. Use |
|
|
|
* Class constructor, not for direct instantiation. Use |
|
|
|
* {@link MockRestRequestMatchers#xpath(String, Object...)} or |
|
|
|
* {@link MockRestRequestMatchers#xpath(String, Object...)} or |
|
|
|
* {@link MockRestRequestMatchers#xpath(String, Map, Object...)}. |
|
|
|
* {@link MockRestRequestMatchers#xpath(String, Map, Object...)}. |
|
|
|
* |
|
|
|
|
|
|
|
* @param expression the XPath expression |
|
|
|
* @param expression the XPath expression |
|
|
|
* @param namespaces XML namespaces referenced in the XPath expression, or {@code null} |
|
|
|
* @param namespaces XML namespaces referenced in the XPath expression, or {@code null} |
|
|
|
* @param args arguments to parameterize the XPath expression with using the |
|
|
|
* @param args arguments to parameterize the XPath expression with using the |
|
|
|
* formatting specifiers defined in {@link String#format(String, Object...)} |
|
|
|
* formatting specifiers defined in {@link String#format(String, Object...)} |
|
|
|
* |
|
|
|
|
|
|
|
* @throws XPathExpressionException |
|
|
|
* @throws XPathExpressionException |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected XpathRequestMatchers(String expression, Map<String, String> namespaces, Object ... args) |
|
|
|
protected XpathRequestMatchers(String expression, Map<String, String> namespaces, Object ... args) |
|
|
@ -60,6 +58,7 @@ public class XpathRequestMatchers { |
|
|
|
this.xpathHelper = new XpathExpectationsHelper(expression, namespaces, args); |
|
|
|
this.xpathHelper = new XpathExpectationsHelper(expression, namespaces, args); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Apply the XPath and assert it with the given {@code Matcher<Node>}. |
|
|
|
* Apply the XPath and assert it with the given {@code Matcher<Node>}. |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -199,7 +198,6 @@ public class XpathRequestMatchers { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected abstract void matchInternal(MockClientHttpRequest request) throws Exception; |
|
|
|
protected abstract void matchInternal(MockClientHttpRequest request) throws Exception; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|