Strategy that matches control and tests nodes for comparison.
There is an important difference between using ElementSelectors#Or to combine multiple ElementSelectors and using DefaultNodeMatcher's constructor with multiple ElementSelectors:
Consider ElementSelectors e1 and e2 and two control and test nodes each. Assume e1 would match the first control node to the second test node and vice versa if used alone, while e2 would match the nodes in order (the first control node to the first test and so on).
ElementSelectors#Or creates a combined ElementSelector that is willing to match the first control node to both of the test nodes - and the same for the second control node. Since nodes are compared in order when possible the result will be the same as running e2 alone.
DefaultNodeMatcher with two ElementSelectors will consult the ElementSelectors separately and only invoke e2 if there are any nodes not matched by e1 at all. In this case the result will be the same as running e1 alone.
See Also: Inherited members from object.
|
Creates a new DefaultNodeMatcher using ElementSelectors.Default(System.Xml.XmlElement, System.Xml.XmlElement) and DefaultNodeMatcher.DefaultNodeTypeMatcher(System.Xml.XmlNodeType, System.Xml.XmlNodeType). | |
|
DefaultNodeMatcher
(params ElementSelector[])
|
Creates a new DefaultNodeMatcher using the given Org.XmlUnit.Diff.ElementSelectors and DefaultNodeMatcher.DefaultNodeTypeMatcher(System.Xml.XmlNodeType, System.Xml.XmlNodeType). |
|
Creates a new DefaultNodeMatcher using the given Org.XmlUnit.Diff.ElementSelector and Org.XmlUnit.Diff.DefaultNodeMatcher.NodeTypeMatcher. |
static
|
DefaultNodeTypeMatcher
(System.Xml.XmlNodeType, System.Xml.XmlNodeType)Default implementation of Org.XmlUnit.Diff.DefaultNodeMatcher.NodeTypeMatcher that makes node types of the same type eligible and allows Text and CDATA nodes to be compared to each other. |
|
|
Match
(IEnumerable<System.Xml.XmlNode>, IEnumerable<System.Xml.XmlNode>)Documentation for this section has not yet been entered. |
static
|
Singleton<T>
(this T)An enumerable containing a single element. |
Creates a new DefaultNodeMatcher using ElementSelectors.Default(System.Xml.XmlElement, System.Xml.XmlElement) and DefaultNodeMatcher.DefaultNodeTypeMatcher(System.Xml.XmlNodeType, System.Xml.XmlNodeType).Syntax
public DefaultNodeMatcher ()Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Creates a new DefaultNodeMatcher using the given Org.XmlUnit.Diff.ElementSelectors and DefaultNodeMatcher.DefaultNodeTypeMatcher(System.Xml.XmlNodeType, System.Xml.XmlNodeType).Syntax
public DefaultNodeMatcher (params ElementSelector[] es)Parameters
- es
- the element selectors to use
Remarks
The Org.XmlUnit.Diff.ElementSelectors are consulted in order so that the second Org.XmlUnit.Diff.ElementSelector only gets to match the nodes that the first one couldn't match to any test nodes ate all and so on.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Creates a new DefaultNodeMatcher using the given Org.XmlUnit.Diff.ElementSelector and Org.XmlUnit.Diff.DefaultNodeMatcher.NodeTypeMatcher.Syntax
public DefaultNodeMatcher (DefaultNodeMatcher.NodeTypeMatcher ntm, params ElementSelector[] es)Parameters
- ntm
- NodeTypeMatcher to use
- es
- the element selector to use
Remarks
The Org.XmlUnit.Diff.ElementSelectors are consulted in order so that the second Org.XmlUnit.Diff.ElementSelector only gets to match the nodes that the first one couldn't match to any test nodes ate all and so on.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Default implementation of Org.XmlUnit.Diff.DefaultNodeMatcher.NodeTypeMatcher that makes node types of the same type eligible and allows Text and CDATA nodes to be compared to each other.Syntax
public static bool DefaultNodeTypeMatcher (System.Xml.XmlNodeType controlType, System.Xml.XmlNodeType testType)Parameters
- controlType
- node type on the control side
- testType
- node type on the test side
Returns
whether the two node types can be comparedRemarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241
Documentation for this section has not yet been entered.Syntax
public IEnumerable<KeyValuePair<System.Xml.XmlNode, System.Xml.XmlNode>> Match (IEnumerable<System.Xml.XmlNode> controlNodes, IEnumerable<System.Xml.XmlNode> testNodes)Parameters
- controlNodes
- Documentation for this section has not yet been entered.
- testNodes
- Documentation for this section has not yet been entered.
Returns
Documentation for this section has not yet been entered.Remarks
Documentation for this section has not yet been entered.Requirements
Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241