Class XMLTruth

java.lang.Object
org.apache.axiom.truth.xml.XMLTruth

public final class XMLTruth extends Object
Google Truth extension for XML.
  • Method Details

    • xml

      public static com.google.common.truth.Subject.Factory<XMLSubject,Object> xml()
      Get the Subject.Factory to be used with Truth.assertAbout(Subject.Factory).
      Returns:
      a Subject.Factory for XMLSubject instances
    • xml

      public static <T> Object xml(Class<T> type, T object)
      Prepare XML data so that it will be accessed through a particular API. Use this method for objects that represent XML data, but that implement more than one API supported by the factory returned by xml() (e.g. DOM and the Axiom API).
      Parameters:
      type - the API to use (e.g. Document
      object - an object implementing that API
      Returns:
      an object that can be passed to SimpleSubjectBuilder.that(Object) or XMLSubject.hasSameContentAs(Object)