Package org.xmlunit.matchers
Class ValidationMatcher
java.lang.Object
org.hamcrest.BaseMatcher
org.xmlunit.matchers.ValidationMatcher
- All Implemented Interfaces:
org.hamcrest.Matcher
,org.hamcrest.SelfDescribing
public class ValidationMatcher
extends org.hamcrest.BaseMatcher
Hamcrest Matcher for XML Validation against W3C XML Schema using
JAXPValidator
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
describeMismatch
(Object item, org.hamcrest.Description mismatchDescription) void
describeTo
(org.hamcrest.Description description) boolean
static ValidationMatcher
Creates a matcher that validates the XML under test.static ValidationMatcher
Creates a matcher that validates the XML under test.Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
-
Constructor Details
-
ValidationMatcher
- Parameters:
schemaSource
- schema source document(s)
-
ValidationMatcher
- Parameters:
schema
- schema source document- Since:
- XMLUnit 2.3.0
-
-
Method Details
-
matches
-
describeTo
public void describeTo(org.hamcrest.Description description) -
describeMismatch
- Specified by:
describeMismatch
in interfaceorg.hamcrest.Matcher
- Overrides:
describeMismatch
in classorg.hamcrest.BaseMatcher
-
valid
Creates a matcher that validates the XML under test.- Parameters:
schemaSource
- schema source document- Returns:
- matcher
-
valid
Creates a matcher that validates the XML under test.- Parameters:
schema
- schema source document- Returns:
- matcher
- Since:
- XMLUnit 2.3.0
-