Class 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

      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
      void describeMismatch​(java.lang.Object item, org.hamcrest.Description mismatchDescription)  
      void describeTo​(org.hamcrest.Description description)  
      boolean matches​(java.lang.Object instance)  
      static ValidationMatcher valid​(java.lang.Object schemaSource)  
      static ValidationMatcher valid​(javax.xml.validation.Schema schema)  
      • Methods inherited from class org.hamcrest.BaseMatcher

        _dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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
    • Constructor Detail

      • ValidationMatcher

        public ValidationMatcher​(java.lang.Object... schemaSource)
      • ValidationMatcher

        public ValidationMatcher​(javax.xml.validation.Schema schema)
        Since:
        XMLUnit 2.3.0
    • 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:
        describeMismatch in interface org.hamcrest.Matcher
        Overrides:
        describeMismatch in class org.hamcrest.BaseMatcher
      • valid

        public static ValidationMatcher valid​(javax.xml.validation.Schema schema)
        Since:
        XMLUnit 2.3.0