org.custommonkey.xmlunit
public class ElementNameAndAttributeQualifier extends ElementNameQualifier
See Also: DifferenceEngine overrideElementQualifier
Field Summary | |
---|---|
static String[] | ALL_ATTRIBUTES |
Constructor Summary | |
---|---|
ElementNameAndAttributeQualifier()
No-args constructor: use all attributes from all elements to determine
whether elements qualify for comparability | |
ElementNameAndAttributeQualifier(String attrName)
Simple constructor for a single qualifying attribute name | |
ElementNameAndAttributeQualifier(String[] attrNames)
Extended constructor for multiple qualifying attribute names |
Method Summary | |
---|---|
protected boolean | areAttributesComparable(Element control, Element test)
Determine whether the qualifying attributes are present in both elements
and if so whether their values are the same |
boolean | qualifyForComparison(Element control, Element test)
Determine whether two elements qualify for further Difference comparison. |
Parameters: attrName the value to use to qualify whether two elements can be compared further for differences
Parameters: attrNames the array of values to use to qualify whether two elements can be compared further for differences
Parameters: control test
Returns: true if all qualifying attributes are present with the same values, false otherwise
Parameters: differenceEngine the DifferenceEngine instance wanting to determine if the elements are comparable control test
Returns: true if the two elements qualify for further comparison based on both the superclass qualification (namespace URI and non- namespaced tag name), and the presence of qualifying attributes with the same values; false otherwise