Class MatchesXPathPattern
- java.lang.Object
-
- com.github.tomakehurst.wiremock.matching.ContentPattern<java.lang.String>
-
- com.github.tomakehurst.wiremock.matching.StringValuePattern
-
- com.github.tomakehurst.wiremock.matching.PathPattern
-
- com.github.tomakehurst.wiremock.matching.MatchesXPathPattern
-
- All Implemented Interfaces:
NamedValueMatcher<java.lang.String>
,ValueMatcher<java.lang.String>
public class MatchesXPathPattern extends PathPattern
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.tomakehurst.wiremock.matching.PathPattern
PathPattern.SubExpressionException
-
-
Field Summary
-
Fields inherited from class com.github.tomakehurst.wiremock.matching.PathPattern
valuePattern
-
Fields inherited from class com.github.tomakehurst.wiremock.matching.ContentPattern
expectedValue
-
-
Constructor Summary
Constructors Constructor Description MatchesXPathPattern(java.lang.String xpath)
MatchesXPathPattern(java.lang.String xpath, StringValuePattern valuePattern)
MatchesXPathPattern(java.lang.String xpath, java.util.Map<java.lang.String,java.lang.String> namespaces)
MatchesXPathPattern(java.lang.String xpath, java.util.Map<java.lang.String,java.lang.String> namespaces, StringValuePattern valuePattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListOrSingle<java.lang.String>
getExpressionResult(java.lang.String value)
java.lang.String
getMatchesXPath()
java.util.Map<java.lang.String,java.lang.String>
getXPathNamespaces()
protected MatchResult
isAdvancedMatch(java.lang.String value)
protected MatchResult
isSimpleMatch(java.lang.String value)
MatchesXPathPattern
withXPathNamespace(java.lang.String name, java.lang.String namespaceUri)
-
Methods inherited from class com.github.tomakehurst.wiremock.matching.PathPattern
equals, getValuePattern, hashCode, isSimple, match
-
Methods inherited from class com.github.tomakehurst.wiremock.matching.StringValuePattern
and, getExpected, getName, isAbsent, isPresent, nullSafeIsAbsent, or, toString
-
Methods inherited from class com.github.tomakehurst.wiremock.matching.ContentPattern
getValue, isNullValuePermitted
-
-
-
-
Constructor Detail
-
MatchesXPathPattern
public MatchesXPathPattern(java.lang.String xpath)
-
MatchesXPathPattern
public MatchesXPathPattern(java.lang.String xpath, StringValuePattern valuePattern)
-
MatchesXPathPattern
public MatchesXPathPattern(java.lang.String xpath, java.util.Map<java.lang.String,java.lang.String> namespaces)
-
MatchesXPathPattern
public MatchesXPathPattern(java.lang.String xpath, java.util.Map<java.lang.String,java.lang.String> namespaces, StringValuePattern valuePattern)
-
-
Method Detail
-
withXPathNamespace
public MatchesXPathPattern withXPathNamespace(java.lang.String name, java.lang.String namespaceUri)
-
getMatchesXPath
public java.lang.String getMatchesXPath()
-
getXPathNamespaces
public java.util.Map<java.lang.String,java.lang.String> getXPathNamespaces()
-
isSimpleMatch
protected MatchResult isSimpleMatch(java.lang.String value)
- Specified by:
isSimpleMatch
in classPathPattern
-
isAdvancedMatch
protected MatchResult isAdvancedMatch(java.lang.String value)
- Specified by:
isAdvancedMatch
in classPathPattern
-
getExpressionResult
public ListOrSingle<java.lang.String> getExpressionResult(java.lang.String value)
- Specified by:
getExpressionResult
in classPathPattern
-
-