xmlunit-core : Org.XmlUnit.Diff Namespace

DefaultNodeMatcher Class

Strategy that matches control and tests nodes for comparison.

Syntax

public class DefaultNodeMatcher : INodeMatcher

Remarks

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.

Requirements

Namespace: Org.XmlUnit.Diff
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.10.0.241

Members

See Also: Inherited members from object.

Public Constructors

Public Methods

static
DefaultNodeTypeMatcher (System.Xml.XmlNodeType, System.Xml.XmlNodeType) : bool
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>) : IEnumerable<KeyValuePair<System.Xml.XmlNode, System.Xml.XmlNode>>
Documentation for this section has not yet been entered.

Extension Methods

static
Singleton<T> (this T) : IEnumerable<T>
An enumerable containing a single element.

Member Details

DefaultNodeMatcher Constructor

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

DefaultNodeMatcher Constructor

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

DefaultNodeMatcher Constructor

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

DefaultNodeTypeMatcher Method

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 compared

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

Match Method

Documentation for this section has not yet been entered.

Syntax

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