Package org.apache.axiom.truth.xml
Class XMLTruth
- java.lang.Object
-
- org.apache.axiom.truth.xml.XMLTruth
-
public final class XMLTruth extends Object
Google Truth extension for XML.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.common.truth.Subject.Factory<XMLSubject,Object>
xml()
Get theSubject.Factory
to be used withTruth.assertAbout(Subject.Factory)
.static <T> Object
xml(Class<T> type, T object)
Prepare XML data so that it will be accessed through a particular API.
-
-
-
Method Detail
-
xml
public static com.google.common.truth.Subject.Factory<XMLSubject,Object> xml()
Get theSubject.Factory
to be used withTruth.assertAbout(Subject.Factory)
.- Returns:
- a
Subject.Factory
forXMLSubject
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 byxml()
(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)
orXMLSubject.hasSameContentAs(Object)
-
-