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.BaseMatcherHamcrest Matcher for XML Validation against W3C XML Schema usingJAXPValidator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classValidationMatcher.HasSystemIdPredicate
-
Field Summary
Fields Modifier and Type Field Description private javax.xml.transform.Sourceinstanceprivate ValidationResultresultprivate javax.xml.validation.Schemaschemaprivate javax.xml.transform.Source[]schemaSource
-
Constructor Summary
Constructors Constructor Description ValidationMatcher(java.lang.Object... schemaSource)ValidationMatcher(javax.xml.validation.Schema schema)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddescribeMismatch(java.lang.Object item, org.hamcrest.Description mismatchDescription)voiddescribeTo(org.hamcrest.Description description)booleanmatches(java.lang.Object instance)static ValidationMatchervalid(java.lang.Object schemaSource)static ValidationMatchervalid(javax.xml.validation.Schema schema)
-
-
-
Field Detail
-
schemaSource
private final javax.xml.transform.Source[] schemaSource
-
schema
private final javax.xml.validation.Schema schema
-
instance
private javax.xml.transform.Source instance
-
result
private ValidationResult result
-
-
Method Detail
-
matches
public boolean matches(java.lang.Object instance)
-
describeTo
public void describeTo(org.hamcrest.Description description)
-
describeMismatch
public void describeMismatch(java.lang.Object item, org.hamcrest.Description mismatchDescription)- Specified by:
describeMismatchin interfaceorg.hamcrest.Matcher- Overrides:
describeMismatchin classorg.hamcrest.BaseMatcher
-
valid
public static ValidationMatcher valid(java.lang.Object schemaSource)
-
valid
public static ValidationMatcher valid(javax.xml.validation.Schema schema)
- Since:
- XMLUnit 2.3.0
-
-