Package org.apache.axiom.truth.xml
Class XMLSubject
java.lang.Object
com.google.common.truth.Subject
org.apache.axiom.truth.xml.XMLSubject
public final class XMLSubject
extends com.google.common.truth.Subject
Propositions for objects representing XML data.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.truth.Subject
com.google.common.truth.Subject.Factory<SubjectT extends com.google.common.truth.Subject,ActualT extends Object> -
Method Summary
Modifier and TypeMethodDescriptionExpand entity references; same asexpandingEntityReferences(true).expandingEntityReferences(boolean value) Specifies if entity references should be expanded.voidhasSameContentAs(Object other) Fails unless the subject represents the same XML as the given object.Ignore comments; same asignoringComments(true).ignoringComments(boolean value) Specifies if comments should be ignored.Ignore element content whitespace; same asignoringElementContentWhitespace(true).ignoringElementContentWhitespace(boolean value) Specifies if element content whitespace should be ignored.Ignore all namespace declarations; same asignoringNamespaceDeclarations(true).ignoringNamespaceDeclarations(boolean value) Specifies if namespace declarations should be ignored.Ignore namespace prefixes; same asignoringNamespacePrefixes(true).ignoringNamespacePrefixes(boolean value) Specifies if namespace prefixes should be ignored.Ignore the prolog and epilog entirely; same asignoringPrologAndEpilog(true).ignoringPrologAndEpilog(boolean value) Specifies if the prolog and epilog should be ignored entirely.Ignore redundant namespace declarations; same asignoringRedundantNamespaceDeclarations(true).ignoringRedundantNamespaceDeclarations(boolean value) Specify if redundant namespace declarations should be ignored.Ignore all whitespace; same asignoringWhitespace(true).ignoringWhitespace(boolean value) Specifies if whitespace should be ignored.Ignore whitespace in the prolog and epilog; same asignoringWhitespaceInPrologAndEpilog(true).ignoringWhitespaceInPrologAndEpilog(boolean value) Specifies if whitespace in the prolog and epilog should be ignored.Treat element content whitespace as simple text nodes; same astreatingElementContentWhitespaceAsText(true).treatingElementContentWhitespaceAsText(boolean value) Specifies how element content whitespace is to be treated.Methods inherited from class com.google.common.truth.Subject
actualCustomStringRepresentation, check, equals, failWithActual, failWithActual, failWithoutActual, hashCode, ignoreCheck, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toString
-
Method Details
-
ignoringComments
Ignore comments; same asignoringComments(true).- Returns:
this
-
ignoringComments
Specifies if comments should be ignored.- Parameters:
value-trueif comments should be ignored,falseotherwise- Returns:
this
-
ignoringElementContentWhitespace
Ignore element content whitespace; same asignoringElementContentWhitespace(true).- Returns:
this
-
ignoringElementContentWhitespace
Specifies if element content whitespace should be ignored. Note that this only has an effect for documents that have a DTD.- Parameters:
value-trueif element content whitespace should be ignored,falseotherwise- Returns:
this
-
ignoringWhitespace
Ignore all whitespace; same asignoringWhitespace(true).- Returns:
this
-
ignoringWhitespace
Specifies if whitespace should be ignored.- Parameters:
value-trueif all text nodes that contain only whitespace should be ignored,falseotherwise- Returns:
this
-
ignoringWhitespaceInPrologAndEpilog
Ignore whitespace in the prolog and epilog; same asignoringWhitespaceInPrologAndEpilog(true).- Returns:
this
-
ignoringWhitespaceInPrologAndEpilog
Specifies if whitespace in the prolog and epilog should be ignored. This is especially useful when working with DOM documents because DOM strips whitespace from the prolog and epilog.- Parameters:
value-trueif whitespace in the prolog and epilog should be ignored,falseotherwise- Returns:
this
-
ignoringPrologAndEpilog
Ignore the prolog and epilog entirely; same asignoringPrologAndEpilog(true).- Returns:
this
-
ignoringPrologAndEpilog
Specifies if the prolog and epilog should be ignored entirely.- Parameters:
value-trueif (text, comment and document type declaration) nodes in the prolog and epilog should be ignored,falseotherwise- Returns:
this
-
ignoringNamespaceDeclarations
Ignore all namespace declarations; same asignoringNamespaceDeclarations(true).- Returns:
this
-
ignoringNamespaceDeclarations
Specifies if namespace declarations should be ignored.- Parameters:
value-trueif namespace declarations should be ignored,falseotherwise- Returns:
this
-
ignoringNamespacePrefixes
Ignore namespace prefixes; same asignoringNamespacePrefixes(true).- Returns:
this
-
ignoringNamespacePrefixes
Specifies if namespace prefixes should be ignored.- Parameters:
value-trueif namespace prefixes are ignored when comparing elements and attributes,falseotherwise- Returns:
this
-
ignoringRedundantNamespaceDeclarations
Ignore redundant namespace declarations; same asignoringRedundantNamespaceDeclarations(true).- Returns:
this
-
ignoringRedundantNamespaceDeclarations
Specify if redundant namespace declarations should be ignored. A namespace declaration is considered redundant if its presence doesn't modify the namespace context.- Parameters:
value-trueif redundant namespace declarations should be ignored,falseif all namespace declarations should be compared- Returns:
this
-
expandingEntityReferences
Expand entity references; same asexpandingEntityReferences(true).- Returns:
this
-
expandingEntityReferences
Specifies if entity references should be expanded.- Parameters:
value-trueif entity references should be expanded and their replacement compared,falseif the entity references themselves should be compared- Returns:
this
-
treatingElementContentWhitespaceAsText
Treat element content whitespace as simple text nodes; same astreatingElementContentWhitespaceAsText(true).- Returns:
this
-
treatingElementContentWhitespaceAsText
Specifies how element content whitespace is to be treated. Use this when comparing a document that has a DTD with a document that doesn't.- Parameters:
value-trueif element whitespace should be considered as text nodes,falseif element whitespace should be considered as a distinct node type- Returns:
this
-
hasSameContentAs
Fails unless the subject represents the same XML as the given object.- Parameters:
other- the object to compare with
-